From: Simon Wunderlich Date: Wed, 30 Nov 2011 15:56:30 +0000 (+0100) Subject: mac80211: fill rate filter for internal scan requests X-Git-Tag: v3.1.5~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2eca885f630f007513f9f07d9635783917bb94e2;p=thirdparty%2Fkernel%2Fstable.git mac80211: fill rate filter for internal scan requests commit c72e8d335e2c6a309b6281f2abcf491f37b8b92b upstream. The rates bitmap for internal scan requests shoud be filled, otherwise there will be probe requests with zero rates supported. Signed-off-by: Simon Wunderlich Signed-off-by: Mathias Kretschmer Signed-off-by: John W. Linville Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/mac80211/main.c b/net/mac80211/main.c index acb44230b2512..3d90dadb5d54e 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -742,6 +742,12 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) if (!local->int_scan_req) return -ENOMEM; + for (band = 0; band < IEEE80211_NUM_BANDS; band++) { + if (!local->hw.wiphy->bands[band]) + continue; + local->int_scan_req->rates[band] = (u32) -1; + } + /* if low-level driver supports AP, we also support VLAN */ if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_AP)) { hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_AP_VLAN);