mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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:
parent
2377799c08
commit
40d9a38ad3
5 changed files with 12 additions and 10 deletions
|
@ -60,7 +60,7 @@ static bool rssi_threshold_check(struct ieee80211_sub_if_data *sdata,
|
|||
{
|
||||
s32 rssi_threshold = sdata->u.mesh.mshcfg.rssi_threshold;
|
||||
return rssi_threshold == 0 ||
|
||||
(sta && (s8) -ewma_read(&sta->avg_signal) > rssi_threshold);
|
||||
(sta && (s8) -ewma_signal_read(&sta->avg_signal) > rssi_threshold);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue