From: Rajkumar Manoharan Date: Wed, 14 Sep 2011 08:58:17 +0000 (+0530) Subject: wireless: Reset beacon_found while updating regulatory X-Git-Tag: v2.6.33.20~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e758f2a629cd1d110a44082b25af1d4f46625556;p=thirdparty%2Fkernel%2Fstable.git wireless: Reset beacon_found while updating regulatory commit aa3d7eef398dd4f29045e9889b817d5161afe03e upstream. During the association, the regulatory is updated by country IE that reaps the previously found beacons. The impact is that after a STA disconnects *or* when for any reason a regulatory domain change happens the beacon hint flag is not cleared therefore preventing future beacon hints to be learned. This is important as a regulatory domain change or a restore of regulatory settings would set back the passive scan and no-ibss flags on the channel. This is the right place to do this given that it covers any regulatory domain change. Reviewed-by: Luis R. Rodriguez Signed-off-by: Rajkumar Manoharan Acked-by: Luis R. Rodriguez Signed-off-by: John W. Linville Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 7a0754c92df47..6c4d92d9f074c 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -998,6 +998,7 @@ static void handle_channel(struct wiphy *wiphy, enum ieee80211_band band, return; } + chan->beacon_found = false; chan->flags = flags | bw_flags | map_regdom_flags(reg_rule->flags); chan->max_antenna_gain = min(chan->orig_mag, (int) MBI_TO_DBI(power_rule->max_antenna_gain));