提交 032a552e 编写于 作者: L Lorenzo Bianconi 提交者: Kalle Valo

mt7601u: set device mac address in mt7601u_add_interface()

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=1516935Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
上级 e96826bd
...@@ -64,6 +64,9 @@ static int mt7601u_add_interface(struct ieee80211_hw *hw, ...@@ -64,6 +64,9 @@ static int mt7601u_add_interface(struct ieee80211_hw *hw,
*/ */
mvif->idx = idx; 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)) if (dev->wcid_mask[wcid / BITS_PER_LONG] & BIT(wcid % BITS_PER_LONG))
return -ENOSPC; return -ENOSPC;
dev->wcid_mask[wcid / BITS_PER_LONG] |= BIT(wcid % BITS_PER_LONG); dev->wcid_mask[wcid / BITS_PER_LONG] |= BIT(wcid % BITS_PER_LONG);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册