]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mt76: mt76x2: fix multi-interface beacon configuration
authorFelix Fietkau <nbd@nbd.name>
Mon, 1 Oct 2018 11:24:00 +0000 (13:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2018 19:08:41 +0000 (11:08 -0800)
commit 5289976ad887deb07c76df7eecf553c264aeebed upstream.

If the first virtual interface is a station (or an AP with beacons
temporarily disabled), the beacon of the second interface needs to
occupy hardware beacon slot 0.
For some reason the beacon index was incorrectly masked with the
virtual interface beacon mask, which prevents the secondary
interface from sending beacons unless the first one also does.

Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/mediatek/mt76/mt76x2_mac.c

index 23cf437d14f96cbe3d39cd3fcb3a81ba4ae5b9a6..1a49d1be042dbc2245202bfd8efe150ca0712b8e 100644 (file)
@@ -128,8 +128,7 @@ __mt76x2_mac_set_beacon(struct mt76x2_dev *dev, u8 bcn_idx, struct sk_buff *skb)
        if (skb) {
                ret = mt76_write_beacon(dev, beacon_addr, skb);
                if (!ret)
-                       dev->beacon_data_mask |= BIT(bcn_idx) &
-                                                dev->beacon_mask;
+                       dev->beacon_data_mask |= BIT(bcn_idx);
        } else {
                dev->beacon_data_mask &= ~BIT(bcn_idx);
                for (i = 0; i < beacon_len; i += 4)