mt76: mt7615: fix event report in mt7615_mcu_bss_event
authorLorenzo Bianconi <lorenzo@kernel.org>
Fri, 24 Apr 2020 12:51:29 +0000 (14:51 +0200)
committerFelix Fietkau <nbd@nbd.name>
Tue, 12 May 2020 17:52:33 +0000 (19:52 +0200)
Currently mt7663 devices do not support DBDC so fw events have no info
about it. Fix mt7615_mcu_bss_event that wrongly use bss_idx as DBDC
band_idx while it is vif index.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c

index a65d814153abaceacdd7d4f2b254bd9384c474ef..8f745c64e9d9027dddb55a274c88c7f9adc58bed 100644 (file)
@@ -356,11 +356,12 @@ mt7615_mcu_bss_event(struct mt7615_dev *dev, struct sk_buff *skb)
 {
        struct mt7615_mcu_bss_event *event;
        struct mt76_phy *mphy;
+       u8 band_idx = 0; /* DBDC support */
 
        event = (struct mt7615_mcu_bss_event *)(skb->data +
                                                sizeof(struct mt7615_mcu_rxd));
 
-       if (event->bss_idx && dev->mt76.phy2)
+       if (band_idx && dev->mt76.phy2)
                mphy = dev->mt76.phy2;
        else
                mphy = &dev->mt76.phy;