diff options
author | Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> | 2017-12-14 16:39:18 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-01-08 19:25:56 +0200 |
commit | a86af66f9b0cacd8e9e6a8fd9e7cf9db624765be (patch) | |
tree | 3513c39c884be8e18ae1767badf47660c8a6f952 /drivers/net/wireless/mediatek/mt76/mt76x2_init.c | |
parent | e8be626d794bfcb898b582c11b447becc7c78d00 (diff) |
mt76x2: init: fix rx filter default value during init
mt76x2_mac_start writes dev->rxfilter to the hardware. It also happens
during init, before dev->rxfilter is filled with the initval register
value, leading to issues like promisc mode being enabled
unconditionally.
Fix this by reading the default value into dev->rxfilter earlier
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x2_init.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x2_init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c index 160a8c40ce9b..4373a2ba5143 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c @@ -584,6 +584,8 @@ int mt76x2_init_hardware(struct mt76x2_dev *dev) if (ret) return ret; + dev->rxfilter = mt76_rr(dev, MT_RX_FILTR_CFG); + ret = mt76x2_dma_init(dev); if (ret) return ret; @@ -598,7 +600,6 @@ int mt76x2_init_hardware(struct mt76x2_dev *dev) return ret; mt76x2_mac_stop(dev, false); - dev->rxfilter = mt76_rr(dev, MT_RX_FILTR_CFG); return 0; } |