diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2019-01-30 17:02:14 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2019-02-18 19:54:32 +0100 |
commit | f9a043c582193cc6e2ab26ac36630432a4521508 (patch) | |
tree | 8f9ba52d6d2dbfd13e73199a6062cf15ef4b1b56 /drivers/net/wireless/mediatek/mt76/mt76x2/usb_main.c | |
parent | 06662264ce2ad6810af4233424d501036a273223 (diff) |
mt76x02: use commmon add interface for mt76x2u
Since we now support mt76x2u feature to allow set mac address
when creating interface in common code we can use it for
mt76x2u.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x2/usb_main.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x2/usb_main.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/usb_main.c b/drivers/net/wireless/mediatek/mt76/mt76x2/usb_main.c index 286c7f451090..5256c6f879a7 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2/usb_main.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2/usb_main.c @@ -46,19 +46,6 @@ static void mt76x2u_stop(struct ieee80211_hw *hw) mutex_unlock(&dev->mt76.mutex); } -static int mt76x2u_add_interface(struct ieee80211_hw *hw, - struct ieee80211_vif *vif) -{ - struct mt76x02_dev *dev = hw->priv; - unsigned int idx = 8; - - if (!ether_addr_equal(dev->mt76.macaddr, vif->addr)) - mt76x02_mac_setaddr(dev, vif->addr); - - mt76x02_vif_init(dev, vif, idx); - return 0; -} - static int mt76x2u_set_channel(struct mt76x02_dev *dev, struct cfg80211_chan_def *chandef) @@ -125,7 +112,7 @@ const struct ieee80211_ops mt76x2u_ops = { .tx = mt76x02_tx, .start = mt76x2u_start, .stop = mt76x2u_stop, - .add_interface = mt76x2u_add_interface, + .add_interface = mt76x02_add_interface, .remove_interface = mt76x02_remove_interface, .sta_state = mt76_sta_state, .set_key = mt76x02_set_key, |