ath5k: use DECLARE_EWMA
This reduces code size slightly (at least on x86/64) while also removing memory consumption by two unsigned long values for each ath5k device. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
5377d75823
commit
46f26ddf56
@@ -1430,7 +1430,7 @@ ath5k_receive_frame(struct ath5k_hw *ah, struct sk_buff *skb,
|
||||
trace_ath5k_rx(ah, skb);
|
||||
|
||||
if (ath_is_mybeacon(common, (struct ieee80211_hdr *)skb->data)) {
|
||||
ewma_add(&ah->ah_beacon_rssi_avg, rs->rs_rssi);
|
||||
ewma_beacon_rssi_add(&ah->ah_beacon_rssi_avg, rs->rs_rssi);
|
||||
|
||||
/* check beacons in IBSS mode */
|
||||
if (ah->opmode == NL80211_IFTYPE_ADHOC)
|
||||
@@ -2936,7 +2936,7 @@ ath5k_reset(struct ath5k_hw *ah, struct ieee80211_channel *chan,
|
||||
ah->ah_cal_next_short = jiffies +
|
||||
msecs_to_jiffies(ATH5K_TUNE_CALIBRATION_INTERVAL_SHORT);
|
||||
|
||||
ewma_init(&ah->ah_beacon_rssi_avg, 1024, 8);
|
||||
ewma_beacon_rssi_init(&ah->ah_beacon_rssi_avg);
|
||||
|
||||
/* clear survey data and cycle counters */
|
||||
memset(&ah->survey, 0, sizeof(ah->survey));
|
||||
|
Reference in New Issue
Block a user