mac80211: use DECLARE_EWMA
Instead of using the out-of-line average calculation, use the new DECLARE_EWMA() macro to declare a signal EWMA, and use that. This actually *reduces* the code size slightly (on x86-64) while also reducing the station info size by 80 bytes. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
@@ -1428,7 +1428,7 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx)
|
||||
sta->rx_bytes += rx->skb->len;
|
||||
if (!(status->flag & RX_FLAG_NO_SIGNAL_VAL)) {
|
||||
sta->last_signal = status->signal;
|
||||
ewma_add(&sta->avg_signal, -status->signal);
|
||||
ewma_signal_add(&sta->avg_signal, -status->signal);
|
||||
}
|
||||
|
||||
if (status->chains) {
|
||||
@@ -1440,7 +1440,7 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx)
|
||||
continue;
|
||||
|
||||
sta->chain_signal_last[i] = signal;
|
||||
ewma_add(&sta->chain_signal_avg[i], -signal);
|
||||
ewma_signal_add(&sta->chain_signal_avg[i], -signal);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user