summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-08-27 22:21:13 +0300
committerAndi Kleen <ak@linux.intel.com>2010-12-14 23:40:01 +0100
commitb9676bfde50b87df6c2a214a46e7382ddd13a075 (patch)
tree32e306be3b11516ba21c793f639437631751b2a2 /net
parent96303095042fabda86dbadf7fea4ec3ad122a0f6 (diff)
mac80211: Fix signal strength average initialization for CQM events
commit 3ba06c6fbd651ed3377e584026d1c112b492cc8b upstream. 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. Signed-off-by: Jouni Malinen <j@w1.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'net')
-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 578b2896387d..6373bceb5365 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1488,7 +1488,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
ifmgd->last_beacon_signal = rx_status->signal;
if (ifmgd->flags & IEEE80211_STA_RESET_SIGNAL_AVE) {
ifmgd->flags &= ~IEEE80211_STA_RESET_SIGNAL_AVE;
- ifmgd->ave_beacon_signal = rx_status->signal;
+ ifmgd->ave_beacon_signal = rx_status->signal * 16;
ifmgd->last_cqm_event_signal = 0;
} else {
ifmgd->ave_beacon_signal =