mac80211: restrict advertised HW scan rates
[linux-2.6.git] / net / mac80211 / scan.c
index 1758b46..6403722 100644 (file)
@@ -228,6 +228,7 @@ ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
 static bool ieee80211_prep_hw_scan(struct ieee80211_local *local)
 {
        struct cfg80211_scan_request *req = local->scan_req;
+       struct ieee80211_sub_if_data *sdata = local->scan_sdata;
        enum ieee80211_band band;
        int i, ielen, n_chans;
 
@@ -251,8 +252,8 @@ static bool ieee80211_prep_hw_scan(struct ieee80211_local *local)
        local->hw_scan_req->n_channels = n_chans;
 
        ielen = ieee80211_build_preq_ies(local, (u8 *)local->hw_scan_req->ie,
-                                        req->ie, req->ie_len, band, (u32) -1,
-                                        0);
+                                        req->ie, req->ie_len, band,
+                                        sdata->rc_rateidx_mask[band], 0);
        local->hw_scan_req->ie_len = ielen;
 
        return true;