diff options
author | Bruno Randolf <br1@einfach.org> | 2010-11-16 04:58:43 +0300 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-18 22:22:19 +0300 |
commit | eef39befaae2a1559efe197d795c376a317af2af (patch) | |
tree | 341245e6b696b69ae01a0bbbfd7da57df515ec50 /drivers/net/wireless/ath/ath5k/base.c | |
parent | c5485a7e7569ab32eea240c850198519e2a765ef (diff) | |
download | linux-eef39befaae2a1559efe197d795c376a317af2af.tar.xz |
ath5k: Use generic EWMA library
Remove ath5k's private moving average implementation in favour of the generic
library version.
Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/base.c')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/base.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 13735cc899a5..7f783d9462aa 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c @@ -1301,8 +1301,7 @@ ath5k_update_beacon_rssi(struct ath5k_softc *sc, struct sk_buff *skb, int rssi) memcmp(mgmt->bssid, common->curbssid, ETH_ALEN) != 0) return; - ah->ah_beacon_rssi_avg = ath5k_moving_average(ah->ah_beacon_rssi_avg, - rssi); + ewma_add(&ah->ah_beacon_rssi_avg, rssi); /* in IBSS mode we should keep RSSI statistics per neighbour */ /* le16_to_cpu(mgmt->u.beacon.capab_info) & WLAN_CAPABILITY_IBSS */ @@ -2556,6 +2555,7 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan) ah->ah_cal_next_full = jiffies; ah->ah_cal_next_ani = jiffies; ah->ah_cal_next_nf = jiffies; + ewma_init(&ah->ah_beacon_rssi_avg, 1000, 8); /* * Change channels and update the h/w rate map if we're switching; |