diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-06-22 10:43:48 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-06-27 15:09:39 -0400 |
commit | 8ee3108075c9e9e2701493a245a754b8b0db8e57 (patch) | |
tree | 0aca6192c6c79618ca97daebf33413708698e589 /net/mac80211/scan.c | |
parent | 04b7dcf979d71e870683c804802e44287a802760 (diff) |
mac80211: restrict advertised HW scan rates
Advertise only user-requested bitrates in a HW scan.
Note that the hw_scan API doesn't currently have a
way of asking for a specific probe request bitrate,
so we might end up using a bitrate that we don't
advertise as supported. I'll fix that later.
Also add a hexdump printk to hwsim to verify this.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/scan.c')
-rw-r--r-- | net/mac80211/scan.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 1758b463c583..6403722da603 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -228,6 +228,7 @@ ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb) | |||
228 | static bool ieee80211_prep_hw_scan(struct ieee80211_local *local) | 228 | static bool ieee80211_prep_hw_scan(struct ieee80211_local *local) |
229 | { | 229 | { |
230 | struct cfg80211_scan_request *req = local->scan_req; | 230 | struct cfg80211_scan_request *req = local->scan_req; |
231 | struct ieee80211_sub_if_data *sdata = local->scan_sdata; | ||
231 | enum ieee80211_band band; | 232 | enum ieee80211_band band; |
232 | int i, ielen, n_chans; | 233 | int i, ielen, n_chans; |
233 | 234 | ||
@@ -251,8 +252,8 @@ static bool ieee80211_prep_hw_scan(struct ieee80211_local *local) | |||
251 | local->hw_scan_req->n_channels = n_chans; | 252 | local->hw_scan_req->n_channels = n_chans; |
252 | 253 | ||
253 | ielen = ieee80211_build_preq_ies(local, (u8 *)local->hw_scan_req->ie, | 254 | ielen = ieee80211_build_preq_ies(local, (u8 *)local->hw_scan_req->ie, |
254 | req->ie, req->ie_len, band, (u32) -1, | 255 | req->ie, req->ie_len, band, |
255 | 0); | 256 | sdata->rc_rateidx_mask[band], 0); |
256 | local->hw_scan_req->ie_len = ielen; | 257 | local->hw_scan_req->ie_len = ielen; |
257 | 258 | ||
258 | return true; | 259 | return true; |