[PATCH] [15/223] mac80211: Fix signal strength average initialization for CQM events

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andi Kleen
Date: Sunday, December 12, 2010 - 4:45 pm

2.6.35-longterm review patch.  If anyone has any objections, please let me know.

------------------
From: Jouni Malinen <j@w1.fi>

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>

---
 net/mac80211/mlme.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux/net/mac80211/mlme.c
===================================================================
--- linux.orig/net/mac80211/mlme.c
+++ linux/net/mac80211/mlme.c
@@ -1488,7 +1488,7 @@ static void ieee80211_rx_mgmt_beacon(str
 	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 =
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] [0/223] 2.6.35.10 longterm review, Andi Kleen, (Sun Dec 12, 4:44 pm)
[PATCH] [10/223] cfg80211: fix BSS double-unlinking, Andi Kleen, (Sun Dec 12, 4:45 pm)
[PATCH] [11/223] cfg80211: fix locking, Andi Kleen, (Sun Dec 12, 4:45 pm)
[PATCH] [15/223] mac80211: Fix signal strength average ini ..., Andi Kleen, (Sun Dec 12, 4:45 pm)
[PATCH] [42/223] NFSv4: Fix open recovery, Andi Kleen, (Sun Dec 12, 4:45 pm)
Re: [PATCH] [0/223] 2.6.35.10 longterm review, Randy Dunlap, (Thu Dec 16, 10:42 am)