diff options
author | Felix Fietkau <nbd@nbd.name> | 2022-02-04 22:11:01 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2022-02-24 16:40:22 +0300 |
commit | 4550fb9e98104febbc98b39fdc522e0bb80c915f (patch) | |
tree | b2136d0db8b846579001f0d8ecd2e03d0fd44a25 /drivers/net/wireless/mediatek/mt76/mt7603 | |
parent | 77787358bed9131767118d3bd9f6a38405c2bfde (diff) |
mt76: improve signal strength reporting
Instead of just taking the maximum per-chain signal strength values,
add an approximation for the sum of the combined signal.
This should more accurately reflect the real signal strength, especially
if the per-chain signal strength values are close to each other
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7603')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7603/mac.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c index a272d64808c3..2e5d26616bc2 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c @@ -643,11 +643,6 @@ mt7603_mac_fill_rx(struct mt7603_dev *dev, struct sk_buff *skb) status->chain_signal[1] = FIELD_GET(MT_RXV4_IB_RSSI1, rxdg3) + dev->rssi_offset[1]; - status->signal = status->chain_signal[0]; - if (status->chains & BIT(1)) - status->signal = max(status->signal, - status->chain_signal[1]); - if (FIELD_GET(MT_RXV1_FRAME_MODE, rxdg0) == 1) status->bw = RATE_INFO_BW_40; |