aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-07-23 08:53:27 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-07-31 10:18:56 -0400
commit6b77863b719a4e32909c218c0d5a83a14f4d98c5 (patch)
treed259001a7b7c4963de72cd6b3b9bf8d350d2f1c8 /net/mac80211/tx.c
parent679ef4eadde1f8e55074427c0d8de2da55ca81f9 (diff)
mac80211: fix current vs. operating channel in preq/beacon
When sending probe requests, e.g. during software scanning, these will go out on the *current* channel, so their IEs need to be built from the current channel. At other times, e.g. for beacons or probe request templates, the IEs will be used on the *operating* channel and using the current channel instead might result in errors. Add the appropriate parameters to respect the difference. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 7558ba58ea23..b559c6bd8681 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2303,7 +2303,7 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
2303 struct ieee80211_if_ap *ap = NULL; 2303 struct ieee80211_if_ap *ap = NULL;
2304 struct beacon_data *beacon; 2304 struct beacon_data *beacon;
2305 struct ieee80211_supported_band *sband; 2305 struct ieee80211_supported_band *sband;
2306 enum ieee80211_band band = local->hw.conf.channel->band; 2306 enum ieee80211_band band = local->oper_channel->band;
2307 struct ieee80211_tx_rate_control txrc; 2307 struct ieee80211_tx_rate_control txrc;
2308 2308
2309 sband = local->hw.wiphy->bands[band]; 2309 sband = local->hw.wiphy->bands[band];
@@ -2429,9 +2429,9 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
2429 *pos++ = WLAN_EID_SSID; 2429 *pos++ = WLAN_EID_SSID;
2430 *pos++ = 0x0; 2430 *pos++ = 0x0;
2431 2431
2432 if (ieee80211_add_srates_ie(sdata, skb, true) || 2432 if (ieee80211_add_srates_ie(sdata, skb, true, band) ||
2433 mesh_add_ds_params_ie(skb, sdata) || 2433 mesh_add_ds_params_ie(skb, sdata) ||
2434 ieee80211_add_ext_srates_ie(sdata, skb, true) || 2434 ieee80211_add_ext_srates_ie(sdata, skb, true, band) ||
2435 mesh_add_rsn_ie(skb, sdata) || 2435 mesh_add_rsn_ie(skb, sdata) ||
2436 mesh_add_ht_cap_ie(skb, sdata) || 2436 mesh_add_ht_cap_ie(skb, sdata) ||
2437 mesh_add_ht_oper_ie(skb, sdata) || 2437 mesh_add_ht_oper_ie(skb, sdata) ||