mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: fix rssi ewma tracking
The generic EWMA code cannot deal with negative numbers, so convert signal to a positive number before adding it Fixes mt76x2 AGC tuning Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
+3
-1
@@ -564,7 +564,9 @@ mt76_check_sta(struct mt76_dev *dev, struct sk_buff *skb)
|
||||
|
||||
sta = container_of((void *) wcid, struct ieee80211_sta, drv_priv);
|
||||
|
||||
ewma_signal_add(&wcid->rssi, status->signal);
|
||||
if (status->signal <= 0)
|
||||
ewma_signal_add(&wcid->rssi, -status->signal);
|
||||
|
||||
wcid->inactive_count = 0;
|
||||
|
||||
if (!test_bit(MT_WCID_FLAG_CHECK_PS, &wcid->flags))
|
||||
|
||||
Reference in New Issue
Block a user