aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-08-27 15:21:13 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-08-31 14:20:40 -0400
commit3ba06c6fbd651ed3377e584026d1c112b492cc8b (patch)
tree0b8159ae02a76be2c425fd00cd95b9f48ebc2133 /net/mac80211
parent486699532e43460234cbebc19cbebd2755b67da3 (diff)
mac80211: Fix signal strength average initialization for CQM events
The ave_beacon_signal value uses 1/16 dB unit and as such, must be initialized with the signal level of the first Beacon frame multiplied by 16. This fixes an issue where the initial CQM events are reported incorrectly with a burst of events while the running average approaches the correct value after the incorrect initialization. This could cause user space -based roaming decision process to get quite confused at the moment when we would like to go through authentication and DHCP. Cc: stable@kernel.org Signed-off-by: Jouni Malinen <j@w1.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/mlme.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index c8694478cde2..7915726d791e 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1553,7 +1553,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
1553 ifmgd->last_beacon_signal = rx_status->signal; 1553 ifmgd->last_beacon_signal = rx_status->signal;
1554 if (ifmgd->flags & IEEE80211_STA_RESET_SIGNAL_AVE) { 1554 if (ifmgd->flags & IEEE80211_STA_RESET_SIGNAL_AVE) {
1555 ifmgd->flags &= ~IEEE80211_STA_RESET_SIGNAL_AVE; 1555 ifmgd->flags &= ~IEEE80211_STA_RESET_SIGNAL_AVE;
1556 ifmgd->ave_beacon_signal = rx_status->signal; 1556 ifmgd->ave_beacon_signal = rx_status->signal * 16;
1557 ifmgd->last_cqm_event_signal = 0; 1557 ifmgd->last_cqm_event_signal = 0;
1558 } else { 1558 } else {
1559 ifmgd->ave_beacon_signal = 1559 ifmgd->ave_beacon_signal =