]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
mt76x2: init: fix rx filter default value during init
authorLorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Thu, 14 Dec 2017 15:39:18 +0000 (16:39 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 8 Jan 2018 17:25:56 +0000 (19:25 +0200)
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>
drivers/net/wireless/mediatek/mt76/mt76x2_init.c

index 160a8c40ce9b9254674b63a235d3dc43bacdf9e8..4373a2ba5143a19fd28b63d941bedd6533665086 100644 (file)
@@ -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;
 }