mac80211: split hardware scan by band
[safe/jmp/linux-2.6] / net / mac80211 / util.c
index aeb65b3..aedbaaa 100644 (file)
@@ -872,13 +872,14 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
 }
 
 int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer,
-                            const u8 *ie, size_t ie_len)
+                            const u8 *ie, size_t ie_len,
+                            enum ieee80211_band band)
 {
        struct ieee80211_supported_band *sband;
        u8 *pos, *supp_rates_len, *esupp_rates_len = NULL;
        int i;
 
-       sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
+       sband = local->hw.wiphy->bands[band];
 
        pos = buffer;
 
@@ -966,7 +967,8 @@ void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst,
        memcpy(pos, ssid, ssid_len);
        pos += ssid_len;
 
-       skb_put(skb, ieee80211_build_preq_ies(local, pos, ie, ie_len));
+       skb_put(skb, ieee80211_build_preq_ies(local, pos, ie, ie_len,
+                                             local->hw.conf.channel->band));
 
        ieee80211_tx_skb(sdata, skb, 0);
 }