mt76: fix per-chain signal strength reporting
authorFelix Fietkau <nbd@nbd.name>
Tue, 22 Jan 2019 15:33:53 +0000 (16:33 +0100)
committerFelix Fietkau <nbd@nbd.name>
Tue, 22 Jan 2019 15:37:28 +0000 (16:37 +0100)
Fix an off-by-one error that resulted in not reporting the signal strength
for the first chain

Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt76x02_mac.c

index ce9bb70..63fa27d 100644 (file)
@@ -648,7 +648,7 @@ int mt76x02_mac_process_rx(struct mt76x02_dev *dev, struct sk_buff *skb,
 
        status->chains = BIT(0);
        signal = mt76x02_mac_get_rssi(dev, rxwi->rssi[0], 0);
-       for (i = 1; i < nstreams; i++) {
+       for (i = 0; i < nstreams; i++) {
                status->chains |= BIT(i);
                status->chain_signal[i] = mt76x02_mac_get_rssi(dev,
                                                               rxwi->rssi[i],