summaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-03-26 09:54:16 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-04-16 09:29:45 -0400
commitb2e506bfc4d752b68a0ccaae1e977898263eba4c (patch)
tree1d5e3ea97c5a36de64f894d0a7232e861a10f201 /net/mac80211/mlme.c
parent1b3a2e494bc793445f576c5476e9767cf7621684 (diff)
mac80211: parse VHT channel switch IEs
VHT introduces multiple IEs that need to be parsed for a wide bandwidth channel switch. Two are (currently) needed in mac80211: * wide bandwidth channel switch element * channel switch wrapper element The former is contained in the latter for beacons and probe responses, but not for the spectrum management action frames so the IE parser needs a new argument to differentiate them. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index c53aedb47a6a..3e0421265bfe 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2203,7 +2203,7 @@ static void ieee80211_auth_challenge(struct ieee80211_sub_if_data *sdata,
2203 u32 tx_flags = 0; 2203 u32 tx_flags = 0;
2204 2204
2205 pos = mgmt->u.auth.variable; 2205 pos = mgmt->u.auth.variable;
2206 ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), &elems); 2206 ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), false, &elems);
2207 if (!elems.challenge) 2207 if (!elems.challenge)
2208 return; 2208 return;
2209 auth_data->expected_transaction = 4; 2209 auth_data->expected_transaction = 4;
@@ -2468,7 +2468,7 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
2468 } 2468 }
2469 2469
2470 pos = mgmt->u.assoc_resp.variable; 2470 pos = mgmt->u.assoc_resp.variable;
2471 ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), &elems); 2471 ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), false, &elems);
2472 2472
2473 if (!elems.supp_rates) { 2473 if (!elems.supp_rates) {
2474 sdata_info(sdata, "no SuppRates element in AssocResp\n"); 2474 sdata_info(sdata, "no SuppRates element in AssocResp\n");
@@ -2637,7 +2637,7 @@ ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
2637 capab_info, status_code, (u16)(aid & ~(BIT(15) | BIT(14)))); 2637 capab_info, status_code, (u16)(aid & ~(BIT(15) | BIT(14))));
2638 2638
2639 pos = mgmt->u.assoc_resp.variable; 2639 pos = mgmt->u.assoc_resp.variable;
2640 ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), &elems); 2640 ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), false, &elems);
2641 2641
2642 if (status_code == WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY && 2642 if (status_code == WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY &&
2643 elems.timeout_int && 2643 elems.timeout_int &&
@@ -2760,7 +2760,7 @@ static void ieee80211_rx_mgmt_probe_resp(struct ieee80211_sub_if_data *sdata,
2760 return; 2760 return;
2761 2761
2762 ieee802_11_parse_elems(mgmt->u.probe_resp.variable, len - baselen, 2762 ieee802_11_parse_elems(mgmt->u.probe_resp.variable, len - baselen,
2763 &elems); 2763 false, &elems);
2764 2764
2765 ieee80211_rx_bss_info(sdata, mgmt, len, rx_status, &elems); 2765 ieee80211_rx_bss_info(sdata, mgmt, len, rx_status, &elems);
2766 2766
@@ -2843,7 +2843,7 @@ ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
2843 if (ifmgd->assoc_data && ifmgd->assoc_data->need_beacon && 2843 if (ifmgd->assoc_data && ifmgd->assoc_data->need_beacon &&
2844 ether_addr_equal(mgmt->bssid, ifmgd->assoc_data->bss->bssid)) { 2844 ether_addr_equal(mgmt->bssid, ifmgd->assoc_data->bss->bssid)) {
2845 ieee802_11_parse_elems(mgmt->u.beacon.variable, 2845 ieee802_11_parse_elems(mgmt->u.beacon.variable,
2846 len - baselen, &elems); 2846 len - baselen, false, &elems);
2847 2847
2848 ieee80211_rx_bss_info(sdata, mgmt, len, rx_status, &elems); 2848 ieee80211_rx_bss_info(sdata, mgmt, len, rx_status, &elems);
2849 ifmgd->assoc_data->have_beacon = true; 2849 ifmgd->assoc_data->have_beacon = true;
@@ -2953,7 +2953,7 @@ ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
2953 2953
2954 ncrc = crc32_be(0, (void *)&mgmt->u.beacon.beacon_int, 4); 2954 ncrc = crc32_be(0, (void *)&mgmt->u.beacon.beacon_int, 4);
2955 ncrc = ieee802_11_parse_elems_crc(mgmt->u.beacon.variable, 2955 ncrc = ieee802_11_parse_elems_crc(mgmt->u.beacon.variable,
2956 len - baselen, &elems, 2956 len - baselen, false, &elems,
2957 care_about_ies, ncrc); 2957 care_about_ies, ncrc);
2958 2958
2959 if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) { 2959 if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) {
@@ -3141,7 +3141,7 @@ void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
3141 3141
3142 ieee802_11_parse_elems( 3142 ieee802_11_parse_elems(
3143 mgmt->u.action.u.chan_switch.variable, 3143 mgmt->u.action.u.chan_switch.variable,
3144 ies_len, &elems); 3144 ies_len, true, &elems);
3145 3145
3146 if (elems.parse_error) 3146 if (elems.parse_error)
3147 break; 3147 break;
@@ -3159,7 +3159,7 @@ void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
3159 3159
3160 ieee802_11_parse_elems( 3160 ieee802_11_parse_elems(
3161 mgmt->u.action.u.ext_chan_switch.variable, 3161 mgmt->u.action.u.ext_chan_switch.variable,
3162 ies_len, &elems); 3162 ies_len, true, &elems);
3163 3163
3164 if (elems.parse_error) 3164 if (elems.parse_error)
3165 break; 3165 break;