diff options
author | Deren Wu <deren.wu@mediatek.com> | 2022-03-10 19:42:36 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2022-03-16 19:40:22 +0300 |
commit | 6450b1335f5101f0700fdc67593d355588ebc312 (patch) | |
tree | edcff6c752e4df5f21b3e0d69722f722f70a84a9 /drivers/net/wireless/mediatek | |
parent | f1fe8eefd2dd383beaf1748d8246a421c43865c5 (diff) | |
download | linux-6450b1335f5101f0700fdc67593d355588ebc312.tar.xz |
mt76: fix invalid rssi report
Drop invalid rssi value to calculate a reasonable report
Fixes: 4550fb9e9810 ("mt76: improve signal strength reporting")
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mac80211.c | 5 |
1 files changed, 3 insertions, 2 deletions
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); |