Skip to content

Commit

Permalink
mt7601u: set device mac address in mt7601u_add_interface()
Browse files Browse the repository at this point in the history
If mac80211 adds a vif with a different mac address respect to
the eeprom one, the device will not be able to connect to the ap
since the hw address has not been updated.
Fix the issue updating hw mac address in mt7601u_add_interface routine

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1516935
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  • Loading branch information
Lorenzo Bianconi authored and Kalle Valo committed Feb 28, 2018
1 parent e96826b commit 032a552
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/wireless/mediatek/mt7601u/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ static int mt7601u_add_interface(struct ieee80211_hw *hw,
*/
mvif->idx = idx;

if (!ether_addr_equal(dev->macaddr, vif->addr))
mt7601u_set_macaddr(dev, vif->addr);

if (dev->wcid_mask[wcid / BITS_PER_LONG] & BIT(wcid % BITS_PER_LONG))
return -ENOSPC;
dev->wcid_mask[wcid / BITS_PER_LONG] |= BIT(wcid % BITS_PER_LONG);
Expand Down

0 comments on commit 032a552

Please sign in to comment.