Message ID | 6143aa93f2b705ec84f9a0eef2d2cd61436a9b6f.1646929388.git.deren.wu@mediatek.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Felix Fietkau |
Headers | show |
Series | mt76: fix invalid rssi report | expand |
diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c index 372b94a665ec..5b53d008eb66 100644 --- a/drivers/net/wireless/mediatek/mt76/mac80211.c +++ b/drivers/net/wireless/mediatek/mt76/mac80211.c @@ -942,10 +942,11 @@ mt76_rx_signal(struct mt76_rx_status *status) for (chains = status->chains; chains; chains >>= 1, chain_signal++) { int cur, diff; - if (!(chains & BIT(0))) + cur = *chain_signal; + if (!(chains & BIT(0)) || + cur > 0) continue; - cur = *chain_signal; if (cur > signal) swap(cur, signal);