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 <[email protected]>
This commit is contained in:
Felix Fietkau
2022-02-04 20:13:03 +01:00
parent ddd3c2f38b
commit 7fa5229a42
6 changed files with 33 additions and 29 deletions
-2
View File
@@ -860,9 +860,7 @@ int mt76x02_mac_process_rx(struct mt76x02_dev *dev, struct sk_buff *skb,
status->chain_signal[1] = mt76x02_mac_get_rssi(dev,
rxwi->rssi[1],
1);
signal = max_t(s8, signal, status->chain_signal[1]);
}
status->signal = signal;
status->freq = dev->mphy.chandef.chan->center_freq;
status->band = dev->mphy.chandef.chan->band;