diff options
-rw-r--r-- | drivers/net/wireless/mwifiex/11n.c | 17 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/fw.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/join.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/main.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/scan.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 2 | ||||
-rw-r--r-- | include/linux/ieee80211.h | 14 | ||||
-rw-r--r-- | include/net/mac80211.h | 2 | ||||
-rw-r--r-- | net/mac80211/ibss.c | 16 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 13 | ||||
-rw-r--r-- | net/mac80211/mesh.c | 12 | ||||
-rw-r--r-- | net/mac80211/mesh.h | 2 | ||||
-rw-r--r-- | net/mac80211/mesh_plink.c | 4 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 49 | ||||
-rw-r--r-- | net/mac80211/tx.c | 4 | ||||
-rw-r--r-- | net/mac80211/util.c | 43 |
16 files changed, 102 insertions, 106 deletions
diff --git a/drivers/net/wireless/mwifiex/11n.c b/drivers/net/wireless/mwifiex/11n.c index a5e182b5e944..fe8ebfebcc0e 100644 --- a/drivers/net/wireless/mwifiex/11n.c +++ b/drivers/net/wireless/mwifiex/11n.c | |||
@@ -350,25 +350,26 @@ mwifiex_cmd_append_11n_tlv(struct mwifiex_private *priv, | |||
350 | ret_len += sizeof(struct mwifiex_ie_types_htcap); | 350 | ret_len += sizeof(struct mwifiex_ie_types_htcap); |
351 | } | 351 | } |
352 | 352 | ||
353 | if (bss_desc->bcn_ht_info) { | 353 | if (bss_desc->bcn_ht_oper) { |
354 | if (priv->bss_mode == NL80211_IFTYPE_ADHOC) { | 354 | if (priv->bss_mode == NL80211_IFTYPE_ADHOC) { |
355 | ht_info = (struct mwifiex_ie_types_htinfo *) *buffer; | 355 | ht_info = (struct mwifiex_ie_types_htinfo *) *buffer; |
356 | memset(ht_info, 0, | 356 | memset(ht_info, 0, |
357 | sizeof(struct mwifiex_ie_types_htinfo)); | 357 | sizeof(struct mwifiex_ie_types_htinfo)); |
358 | ht_info->header.type = | 358 | ht_info->header.type = |
359 | cpu_to_le16(WLAN_EID_HT_INFORMATION); | 359 | cpu_to_le16(WLAN_EID_HT_OPERATION); |
360 | ht_info->header.len = | 360 | ht_info->header.len = |
361 | cpu_to_le16(sizeof(struct ieee80211_ht_info)); | 361 | cpu_to_le16( |
362 | sizeof(struct ieee80211_ht_operation)); | ||
362 | 363 | ||
363 | memcpy((u8 *) ht_info + | 364 | memcpy((u8 *) ht_info + |
364 | sizeof(struct mwifiex_ie_types_header), | 365 | sizeof(struct mwifiex_ie_types_header), |
365 | (u8 *) bss_desc->bcn_ht_info + | 366 | (u8 *) bss_desc->bcn_ht_oper + |
366 | sizeof(struct ieee_types_header), | 367 | sizeof(struct ieee_types_header), |
367 | le16_to_cpu(ht_info->header.len)); | 368 | le16_to_cpu(ht_info->header.len)); |
368 | 369 | ||
369 | if (!(sband->ht_cap.cap & | 370 | if (!(sband->ht_cap.cap & |
370 | IEEE80211_HT_CAP_SUP_WIDTH_20_40)) | 371 | IEEE80211_HT_CAP_SUP_WIDTH_20_40)) |
371 | ht_info->ht_info.ht_param &= | 372 | ht_info->ht_oper.ht_param &= |
372 | ~(IEEE80211_HT_PARAM_CHAN_WIDTH_ANY | | 373 | ~(IEEE80211_HT_PARAM_CHAN_WIDTH_ANY | |
373 | IEEE80211_HT_PARAM_CHA_SEC_OFFSET); | 374 | IEEE80211_HT_PARAM_CHA_SEC_OFFSET); |
374 | 375 | ||
@@ -385,16 +386,16 @@ mwifiex_cmd_append_11n_tlv(struct mwifiex_private *priv, | |||
385 | sizeof(struct mwifiex_ie_types_chan_list_param_set) - | 386 | sizeof(struct mwifiex_ie_types_chan_list_param_set) - |
386 | sizeof(struct mwifiex_ie_types_header)); | 387 | sizeof(struct mwifiex_ie_types_header)); |
387 | chan_list->chan_scan_param[0].chan_number = | 388 | chan_list->chan_scan_param[0].chan_number = |
388 | bss_desc->bcn_ht_info->control_chan; | 389 | bss_desc->bcn_ht_oper->primary_chan; |
389 | chan_list->chan_scan_param[0].radio_type = | 390 | chan_list->chan_scan_param[0].radio_type = |
390 | mwifiex_band_to_radio_type((u8) bss_desc->bss_band); | 391 | mwifiex_band_to_radio_type((u8) bss_desc->bss_band); |
391 | 392 | ||
392 | if (sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40 && | 393 | if (sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40 && |
393 | bss_desc->bcn_ht_info->ht_param & | 394 | bss_desc->bcn_ht_oper->ht_param & |
394 | IEEE80211_HT_PARAM_CHAN_WIDTH_ANY) | 395 | IEEE80211_HT_PARAM_CHAN_WIDTH_ANY) |
395 | SET_SECONDARYCHAN(chan_list->chan_scan_param[0]. | 396 | SET_SECONDARYCHAN(chan_list->chan_scan_param[0]. |
396 | radio_type, | 397 | radio_type, |
397 | (bss_desc->bcn_ht_info->ht_param & | 398 | (bss_desc->bcn_ht_oper->ht_param & |
398 | IEEE80211_HT_PARAM_CHA_SEC_OFFSET)); | 399 | IEEE80211_HT_PARAM_CHA_SEC_OFFSET)); |
399 | 400 | ||
400 | *buffer += sizeof(struct mwifiex_ie_types_chan_list_param_set); | 401 | *buffer += sizeof(struct mwifiex_ie_types_chan_list_param_set); |
diff --git a/drivers/net/wireless/mwifiex/fw.h b/drivers/net/wireless/mwifiex/fw.h index e98fc5af73dc..930ad2f4b1e3 100644 --- a/drivers/net/wireless/mwifiex/fw.h +++ b/drivers/net/wireless/mwifiex/fw.h | |||
@@ -1045,7 +1045,7 @@ struct mwifiex_ie_types_htcap { | |||
1045 | 1045 | ||
1046 | struct mwifiex_ie_types_htinfo { | 1046 | struct mwifiex_ie_types_htinfo { |
1047 | struct mwifiex_ie_types_header header; | 1047 | struct mwifiex_ie_types_header header; |
1048 | struct ieee80211_ht_info ht_info; | 1048 | struct ieee80211_ht_operation ht_oper; |
1049 | } __packed; | 1049 | } __packed; |
1050 | 1050 | ||
1051 | struct mwifiex_ie_types_2040bssco { | 1051 | struct mwifiex_ie_types_2040bssco { |
diff --git a/drivers/net/wireless/mwifiex/join.c b/drivers/net/wireless/mwifiex/join.c index 8f9382b9c3ca..bca8b6d52273 100644 --- a/drivers/net/wireless/mwifiex/join.c +++ b/drivers/net/wireless/mwifiex/join.c | |||
@@ -932,20 +932,20 @@ mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv, | |||
932 | /* Fill HT INFORMATION */ | 932 | /* Fill HT INFORMATION */ |
933 | ht_info = (struct mwifiex_ie_types_htinfo *) pos; | 933 | ht_info = (struct mwifiex_ie_types_htinfo *) pos; |
934 | memset(ht_info, 0, sizeof(struct mwifiex_ie_types_htinfo)); | 934 | memset(ht_info, 0, sizeof(struct mwifiex_ie_types_htinfo)); |
935 | ht_info->header.type = cpu_to_le16(WLAN_EID_HT_INFORMATION); | 935 | ht_info->header.type = cpu_to_le16(WLAN_EID_HT_OPERATION); |
936 | ht_info->header.len = | 936 | ht_info->header.len = |
937 | cpu_to_le16(sizeof(struct ieee80211_ht_info)); | 937 | cpu_to_le16(sizeof(struct ieee80211_ht_operation)); |
938 | 938 | ||
939 | ht_info->ht_info.control_chan = | 939 | ht_info->ht_oper.primary_chan = |
940 | (u8) priv->curr_bss_params.bss_descriptor.channel; | 940 | (u8) priv->curr_bss_params.bss_descriptor.channel; |
941 | if (adapter->sec_chan_offset) { | 941 | if (adapter->sec_chan_offset) { |
942 | ht_info->ht_info.ht_param = adapter->sec_chan_offset; | 942 | ht_info->ht_oper.ht_param = adapter->sec_chan_offset; |
943 | ht_info->ht_info.ht_param |= | 943 | ht_info->ht_oper.ht_param |= |
944 | IEEE80211_HT_PARAM_CHAN_WIDTH_ANY; | 944 | IEEE80211_HT_PARAM_CHAN_WIDTH_ANY; |
945 | } | 945 | } |
946 | ht_info->ht_info.operation_mode = | 946 | ht_info->ht_oper.operation_mode = |
947 | cpu_to_le16(IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT); | 947 | cpu_to_le16(IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT); |
948 | ht_info->ht_info.basic_set[0] = 0xff; | 948 | ht_info->ht_oper.basic_set[0] = 0xff; |
949 | pos += sizeof(struct mwifiex_ie_types_htinfo); | 949 | pos += sizeof(struct mwifiex_ie_types_htinfo); |
950 | cmd_append_size += | 950 | cmd_append_size += |
951 | sizeof(struct mwifiex_ie_types_htinfo); | 951 | sizeof(struct mwifiex_ie_types_htinfo); |
diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h index 35225e9b1080..5ce9e7eabf5a 100644 --- a/drivers/net/wireless/mwifiex/main.h +++ b/drivers/net/wireless/mwifiex/main.h | |||
@@ -269,7 +269,7 @@ struct mwifiex_bssdescriptor { | |||
269 | u8 disable_11n; | 269 | u8 disable_11n; |
270 | struct ieee80211_ht_cap *bcn_ht_cap; | 270 | struct ieee80211_ht_cap *bcn_ht_cap; |
271 | u16 ht_cap_offset; | 271 | u16 ht_cap_offset; |
272 | struct ieee80211_ht_info *bcn_ht_info; | 272 | struct ieee80211_ht_operation *bcn_ht_oper; |
273 | u16 ht_info_offset; | 273 | u16 ht_info_offset; |
274 | u8 *bcn_bss_co_2040; | 274 | u8 *bcn_bss_co_2040; |
275 | u16 bss_co_2040_offset; | 275 | u16 bss_co_2040_offset; |
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c index aff9cd763f2b..5948905ff615 100644 --- a/drivers/net/wireless/mwifiex/scan.c +++ b/drivers/net/wireless/mwifiex/scan.c | |||
@@ -1221,9 +1221,9 @@ mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter, | |||
1221 | sizeof(struct ieee_types_header) - | 1221 | sizeof(struct ieee_types_header) - |
1222 | bss_entry->beacon_buf); | 1222 | bss_entry->beacon_buf); |
1223 | break; | 1223 | break; |
1224 | case WLAN_EID_HT_INFORMATION: | 1224 | case WLAN_EID_HT_OPERATION: |
1225 | bss_entry->bcn_ht_info = (struct ieee80211_ht_info *) | 1225 | bss_entry->bcn_ht_oper = |
1226 | (current_ptr + | 1226 | (struct ieee80211_ht_operation *)(current_ptr + |
1227 | sizeof(struct ieee_types_header)); | 1227 | sizeof(struct ieee_types_header)); |
1228 | bss_entry->ht_info_offset = (u16) (current_ptr + | 1228 | bss_entry->ht_info_offset = (u16) (current_ptr + |
1229 | sizeof(struct ieee_types_header) - | 1229 | sizeof(struct ieee_types_header) - |
@@ -1493,7 +1493,7 @@ mwifiex_update_curr_bss_params(struct mwifiex_private *priv, u8 *bssid, | |||
1493 | priv->curr_bss_params.bss_descriptor.bcn_ht_cap = NULL; | 1493 | priv->curr_bss_params.bss_descriptor.bcn_ht_cap = NULL; |
1494 | priv->curr_bss_params.bss_descriptor.ht_cap_offset = | 1494 | priv->curr_bss_params.bss_descriptor.ht_cap_offset = |
1495 | 0; | 1495 | 0; |
1496 | priv->curr_bss_params.bss_descriptor.bcn_ht_info = NULL; | 1496 | priv->curr_bss_params.bss_descriptor.bcn_ht_oper = NULL; |
1497 | priv->curr_bss_params.bss_descriptor.ht_info_offset = | 1497 | priv->curr_bss_params.bss_descriptor.ht_info_offset = |
1498 | 0; | 1498 | 0; |
1499 | priv->curr_bss_params.bss_descriptor.bcn_bss_co_2040 = | 1499 | priv->curr_bss_params.bss_descriptor.bcn_bss_co_2040 = |
@@ -2019,8 +2019,8 @@ mwifiex_save_curr_bcn(struct mwifiex_private *priv) | |||
2019 | (curr_bss->beacon_buf + | 2019 | (curr_bss->beacon_buf + |
2020 | curr_bss->ht_cap_offset); | 2020 | curr_bss->ht_cap_offset); |
2021 | 2021 | ||
2022 | if (curr_bss->bcn_ht_info) | 2022 | if (curr_bss->bcn_ht_oper) |
2023 | curr_bss->bcn_ht_info = (struct ieee80211_ht_info *) | 2023 | curr_bss->bcn_ht_oper = (struct ieee80211_ht_operation *) |
2024 | (curr_bss->beacon_buf + | 2024 | (curr_bss->beacon_buf + |
2025 | curr_bss->ht_info_offset); | 2025 | curr_bss->ht_info_offset); |
2026 | 2026 | ||
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 39002363611e..b1555fb5815b 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -232,7 +232,7 @@ static struct conf_drv_settings default_conf = { | |||
232 | .rule = CONF_BCN_RULE_PASS_ON_APPEARANCE, | 232 | .rule = CONF_BCN_RULE_PASS_ON_APPEARANCE, |
233 | }, | 233 | }, |
234 | [1] = { | 234 | [1] = { |
235 | .ie = WLAN_EID_HT_INFORMATION, | 235 | .ie = WLAN_EID_HT_OPERATION, |
236 | .rule = CONF_BCN_RULE_PASS_ON_CHANGE, | 236 | .rule = CONF_BCN_RULE_PASS_ON_CHANGE, |
237 | }, | 237 | }, |
238 | }, | 238 | }, |
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 210e2c325534..a8c1c46431ab 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -1007,13 +1007,13 @@ enum ieee80211_min_mpdu_spacing { | |||
1007 | }; | 1007 | }; |
1008 | 1008 | ||
1009 | /** | 1009 | /** |
1010 | * struct ieee80211_ht_info - HT information | 1010 | * struct ieee80211_ht_operation - HT operation IE |
1011 | * | 1011 | * |
1012 | * This structure is the "HT information element" as | 1012 | * This structure is the "HT operation element" as |
1013 | * described in 802.11n D5.0 7.3.2.58 | 1013 | * described in 802.11n-2009 7.3.2.57 |
1014 | */ | 1014 | */ |
1015 | struct ieee80211_ht_info { | 1015 | struct ieee80211_ht_operation { |
1016 | u8 control_chan; | 1016 | u8 primary_chan; |
1017 | u8 ht_param; | 1017 | u8 ht_param; |
1018 | __le16 operation_mode; | 1018 | __le16 operation_mode; |
1019 | __le16 stbc_param; | 1019 | __le16 stbc_param; |
@@ -1027,8 +1027,6 @@ struct ieee80211_ht_info { | |||
1027 | #define IEEE80211_HT_PARAM_CHA_SEC_BELOW 0x03 | 1027 | #define IEEE80211_HT_PARAM_CHA_SEC_BELOW 0x03 |
1028 | #define IEEE80211_HT_PARAM_CHAN_WIDTH_ANY 0x04 | 1028 | #define IEEE80211_HT_PARAM_CHAN_WIDTH_ANY 0x04 |
1029 | #define IEEE80211_HT_PARAM_RIFS_MODE 0x08 | 1029 | #define IEEE80211_HT_PARAM_RIFS_MODE 0x08 |
1030 | #define IEEE80211_HT_PARAM_SPSMP_SUPPORT 0x10 | ||
1031 | #define IEEE80211_HT_PARAM_SERV_INTERVAL_GRAN 0xE0 | ||
1032 | 1030 | ||
1033 | /* for operation_mode */ | 1031 | /* for operation_mode */ |
1034 | #define IEEE80211_HT_OP_MODE_PROTECTION 0x0003 | 1032 | #define IEEE80211_HT_OP_MODE_PROTECTION 0x0003 |
@@ -1301,7 +1299,7 @@ enum ieee80211_eid { | |||
1301 | WLAN_EID_EXT_SUPP_RATES = 50, | 1299 | WLAN_EID_EXT_SUPP_RATES = 50, |
1302 | 1300 | ||
1303 | WLAN_EID_HT_CAPABILITY = 45, | 1301 | WLAN_EID_HT_CAPABILITY = 45, |
1304 | WLAN_EID_HT_INFORMATION = 61, | 1302 | WLAN_EID_HT_OPERATION = 61, |
1305 | 1303 | ||
1306 | WLAN_EID_RSN = 48, | 1304 | WLAN_EID_RSN = 48, |
1307 | WLAN_EID_MMIE = 76, | 1305 | WLAN_EID_MMIE = 76, |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 87d203ff7a8a..81cb66c3989e 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -244,7 +244,7 @@ enum ieee80211_rssi_event { | |||
244 | * @channel_type: Channel type for this BSS -- the hardware might be | 244 | * @channel_type: Channel type for this BSS -- the hardware might be |
245 | * configured for HT40+ while this BSS only uses no-HT, for | 245 | * configured for HT40+ while this BSS only uses no-HT, for |
246 | * example. | 246 | * example. |
247 | * @ht_operation_mode: HT operation mode (like in &struct ieee80211_ht_info). | 247 | * @ht_operation_mode: HT operation mode like in &struct ieee80211_ht_operation. |
248 | * This field is only valid when the channel type is one of the HT types. | 248 | * This field is only valid when the channel type is one of the HT types. |
249 | * @cqm_rssi_thold: Connection quality monitor RSSI threshold, a zero value | 249 | * @cqm_rssi_thold: Connection quality monitor RSSI threshold, a zero value |
250 | * implies disabled | 250 | * implies disabled |
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 33fd8d9f714e..547cd7e3018a 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -160,13 +160,11 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, | |||
160 | if (channel_type && sband->ht_cap.ht_supported) { | 160 | if (channel_type && sband->ht_cap.ht_supported) { |
161 | pos = skb_put(skb, 4 + | 161 | pos = skb_put(skb, 4 + |
162 | sizeof(struct ieee80211_ht_cap) + | 162 | sizeof(struct ieee80211_ht_cap) + |
163 | sizeof(struct ieee80211_ht_info)); | 163 | sizeof(struct ieee80211_ht_operation)); |
164 | pos = ieee80211_ie_build_ht_cap(pos, &sband->ht_cap, | 164 | pos = ieee80211_ie_build_ht_cap(pos, &sband->ht_cap, |
165 | sband->ht_cap.cap); | 165 | sband->ht_cap.cap); |
166 | pos = ieee80211_ie_build_ht_info(pos, | 166 | pos = ieee80211_ie_build_ht_oper(pos, &sband->ht_cap, |
167 | &sband->ht_cap, | 167 | chan, channel_type); |
168 | chan, | ||
169 | channel_type); | ||
170 | } | 168 | } |
171 | 169 | ||
172 | if (local->hw.queues >= 4) { | 170 | if (local->hw.queues >= 4) { |
@@ -441,13 +439,13 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, | |||
441 | if (sta && elems->wmm_info) | 439 | if (sta && elems->wmm_info) |
442 | set_sta_flag(sta, WLAN_STA_WME); | 440 | set_sta_flag(sta, WLAN_STA_WME); |
443 | 441 | ||
444 | if (sta && elems->ht_info_elem && elems->ht_cap_elem && | 442 | if (sta && elems->ht_operation && elems->ht_cap_elem && |
445 | sdata->u.ibss.channel_type != NL80211_CHAN_NO_HT) { | 443 | sdata->u.ibss.channel_type != NL80211_CHAN_NO_HT) { |
446 | /* we both use HT */ | 444 | /* we both use HT */ |
447 | struct ieee80211_sta_ht_cap sta_ht_cap_new; | 445 | struct ieee80211_sta_ht_cap sta_ht_cap_new; |
448 | enum nl80211_channel_type channel_type = | 446 | enum nl80211_channel_type channel_type = |
449 | ieee80211_ht_info_to_channel_type( | 447 | ieee80211_ht_oper_to_channel_type( |
450 | elems->ht_info_elem); | 448 | elems->ht_operation); |
451 | 449 | ||
452 | ieee80211_ht_cap_ie_to_sta_ht_cap(sdata, sband, | 450 | ieee80211_ht_cap_ie_to_sta_ht_cap(sdata, sband, |
453 | elems->ht_cap_elem, | 451 | elems->ht_cap_elem, |
@@ -1063,7 +1061,7 @@ int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata, | |||
1063 | 4 /* IBSS params */ + | 1061 | 4 /* IBSS params */ + |
1064 | 2 + (IEEE80211_MAX_SUPP_RATES - 8) + | 1062 | 2 + (IEEE80211_MAX_SUPP_RATES - 8) + |
1065 | 2 + sizeof(struct ieee80211_ht_cap) + | 1063 | 2 + sizeof(struct ieee80211_ht_cap) + |
1066 | 2 + sizeof(struct ieee80211_ht_info) + | 1064 | 2 + sizeof(struct ieee80211_ht_operation) + |
1067 | params->ie_len); | 1065 | params->ie_len); |
1068 | if (!skb) | 1066 | if (!skb) |
1069 | return -ENOMEM; | 1067 | return -ENOMEM; |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index d9798a307f20..0ae822c47930 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -397,7 +397,7 @@ struct ieee80211_mgd_auth_data { | |||
397 | struct ieee80211_mgd_assoc_data { | 397 | struct ieee80211_mgd_assoc_data { |
398 | struct cfg80211_bss *bss; | 398 | struct cfg80211_bss *bss; |
399 | const u8 *supp_rates; | 399 | const u8 *supp_rates; |
400 | const u8 *ht_information_ie; | 400 | const u8 *ht_operation_ie; |
401 | 401 | ||
402 | unsigned long timeout; | 402 | unsigned long timeout; |
403 | int tries; | 403 | int tries; |
@@ -1117,7 +1117,7 @@ struct ieee802_11_elems { | |||
1117 | u8 *wmm_info; | 1117 | u8 *wmm_info; |
1118 | u8 *wmm_param; | 1118 | u8 *wmm_param; |
1119 | struct ieee80211_ht_cap *ht_cap_elem; | 1119 | struct ieee80211_ht_cap *ht_cap_elem; |
1120 | struct ieee80211_ht_info *ht_info_elem; | 1120 | struct ieee80211_ht_operation *ht_operation; |
1121 | struct ieee80211_meshconf_ie *mesh_config; | 1121 | struct ieee80211_meshconf_ie *mesh_config; |
1122 | u8 *mesh_id; | 1122 | u8 *mesh_id; |
1123 | u8 *peering; | 1123 | u8 *peering; |
@@ -1470,10 +1470,9 @@ size_t ieee80211_ie_split(const u8 *ies, size_t ielen, | |||
1470 | size_t ieee80211_ie_split_vendor(const u8 *ies, size_t ielen, size_t offset); | 1470 | size_t ieee80211_ie_split_vendor(const u8 *ies, size_t ielen, size_t offset); |
1471 | u8 *ieee80211_ie_build_ht_cap(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap, | 1471 | u8 *ieee80211_ie_build_ht_cap(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap, |
1472 | u16 cap); | 1472 | u16 cap); |
1473 | u8 *ieee80211_ie_build_ht_info(u8 *pos, | 1473 | u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap, |
1474 | struct ieee80211_sta_ht_cap *ht_cap, | 1474 | struct ieee80211_channel *channel, |
1475 | struct ieee80211_channel *channel, | 1475 | enum nl80211_channel_type channel_type); |
1476 | enum nl80211_channel_type channel_type); | ||
1477 | 1476 | ||
1478 | /* internal work items */ | 1477 | /* internal work items */ |
1479 | void ieee80211_work_init(struct ieee80211_local *local); | 1478 | void ieee80211_work_init(struct ieee80211_local *local); |
@@ -1501,7 +1500,7 @@ bool ieee80211_set_channel_type(struct ieee80211_local *local, | |||
1501 | struct ieee80211_sub_if_data *sdata, | 1500 | struct ieee80211_sub_if_data *sdata, |
1502 | enum nl80211_channel_type chantype); | 1501 | enum nl80211_channel_type chantype); |
1503 | enum nl80211_channel_type | 1502 | enum nl80211_channel_type |
1504 | ieee80211_ht_info_to_channel_type(struct ieee80211_ht_info *ht_info); | 1503 | ieee80211_ht_oper_to_channel_type(struct ieee80211_ht_operation *ht_oper); |
1505 | enum nl80211_channel_type ieee80211_get_tx_channel_type( | 1504 | enum nl80211_channel_type ieee80211_get_tx_channel_type( |
1506 | struct ieee80211_local *local, | 1505 | struct ieee80211_local *local, |
1507 | enum nl80211_channel_type channel_type); | 1506 | enum nl80211_channel_type channel_type); |
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index e5fbb7cf3562..b05fa9ef866c 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c | |||
@@ -98,9 +98,9 @@ bool mesh_matches_local(struct ieee802_11_elems *ie, struct ieee80211_sub_if_dat | |||
98 | goto mismatch; | 98 | goto mismatch; |
99 | 99 | ||
100 | /* disallow peering with mismatched channel types for now */ | 100 | /* disallow peering with mismatched channel types for now */ |
101 | if (ie->ht_info_elem && | 101 | if (ie->ht_operation && |
102 | (local->_oper_channel_type != | 102 | (local->_oper_channel_type != |
103 | ieee80211_ht_info_to_channel_type(ie->ht_info_elem))) | 103 | ieee80211_ht_oper_to_channel_type(ie->ht_operation))) |
104 | goto mismatch; | 104 | goto mismatch; |
105 | 105 | ||
106 | return true; | 106 | return true; |
@@ -371,7 +371,7 @@ int mesh_add_ht_cap_ie(struct sk_buff *skb, | |||
371 | return 0; | 371 | return 0; |
372 | } | 372 | } |
373 | 373 | ||
374 | int mesh_add_ht_info_ie(struct sk_buff *skb, | 374 | int mesh_add_ht_oper_ie(struct sk_buff *skb, |
375 | struct ieee80211_sub_if_data *sdata) | 375 | struct ieee80211_sub_if_data *sdata) |
376 | { | 376 | { |
377 | struct ieee80211_local *local = sdata->local; | 377 | struct ieee80211_local *local = sdata->local; |
@@ -385,11 +385,11 @@ int mesh_add_ht_info_ie(struct sk_buff *skb, | |||
385 | if (!ht_cap->ht_supported || channel_type == NL80211_CHAN_NO_HT) | 385 | if (!ht_cap->ht_supported || channel_type == NL80211_CHAN_NO_HT) |
386 | return 0; | 386 | return 0; |
387 | 387 | ||
388 | if (skb_tailroom(skb) < 2 + sizeof(struct ieee80211_ht_info)) | 388 | if (skb_tailroom(skb) < 2 + sizeof(struct ieee80211_ht_operation)) |
389 | return -ENOMEM; | 389 | return -ENOMEM; |
390 | 390 | ||
391 | pos = skb_put(skb, 2 + sizeof(struct ieee80211_ht_info)); | 391 | pos = skb_put(skb, 2 + sizeof(struct ieee80211_ht_operation)); |
392 | ieee80211_ie_build_ht_info(pos, ht_cap, channel, channel_type); | 392 | ieee80211_ie_build_ht_oper(pos, ht_cap, channel, channel_type); |
393 | 393 | ||
394 | return 0; | 394 | return 0; |
395 | } | 395 | } |
diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h index 8d53b71378e3..2bd5d8b864f6 100644 --- a/net/mac80211/mesh.h +++ b/net/mac80211/mesh.h | |||
@@ -220,7 +220,7 @@ int mesh_add_ds_params_ie(struct sk_buff *skb, | |||
220 | struct ieee80211_sub_if_data *sdata); | 220 | struct ieee80211_sub_if_data *sdata); |
221 | int mesh_add_ht_cap_ie(struct sk_buff *skb, | 221 | int mesh_add_ht_cap_ie(struct sk_buff *skb, |
222 | struct ieee80211_sub_if_data *sdata); | 222 | struct ieee80211_sub_if_data *sdata); |
223 | int mesh_add_ht_info_ie(struct sk_buff *skb, | 223 | int mesh_add_ht_oper_ie(struct sk_buff *skb, |
224 | struct ieee80211_sub_if_data *sdata); | 224 | struct ieee80211_sub_if_data *sdata); |
225 | void mesh_rmc_free(struct ieee80211_sub_if_data *sdata); | 225 | void mesh_rmc_free(struct ieee80211_sub_if_data *sdata); |
226 | int mesh_rmc_init(struct ieee80211_sub_if_data *sdata); | 226 | int mesh_rmc_init(struct ieee80211_sub_if_data *sdata); |
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index 4e53c4cbca9e..923269b62b43 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c | |||
@@ -187,7 +187,7 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata, | |||
187 | 2 + sdata->u.mesh.mesh_id_len + | 187 | 2 + sdata->u.mesh.mesh_id_len + |
188 | 2 + sizeof(struct ieee80211_meshconf_ie) + | 188 | 2 + sizeof(struct ieee80211_meshconf_ie) + |
189 | 2 + sizeof(struct ieee80211_ht_cap) + | 189 | 2 + sizeof(struct ieee80211_ht_cap) + |
190 | 2 + sizeof(struct ieee80211_ht_info) + | 190 | 2 + sizeof(struct ieee80211_ht_operation) + |
191 | 2 + 8 + /* peering IE */ | 191 | 2 + 8 + /* peering IE */ |
192 | sdata->u.mesh.ie_len); | 192 | sdata->u.mesh.ie_len); |
193 | if (!skb) | 193 | if (!skb) |
@@ -263,7 +263,7 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata, | |||
263 | 263 | ||
264 | if (action != WLAN_SP_MESH_PEERING_CLOSE) { | 264 | if (action != WLAN_SP_MESH_PEERING_CLOSE) { |
265 | if (mesh_add_ht_cap_ie(skb, sdata) || | 265 | if (mesh_add_ht_cap_ie(skb, sdata) || |
266 | mesh_add_ht_info_ie(skb, sdata)) | 266 | mesh_add_ht_oper_ie(skb, sdata)) |
267 | return -1; | 267 | return -1; |
268 | } | 268 | } |
269 | 269 | ||
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index f733aeb50e85..c59bc509ed6f 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -177,7 +177,7 @@ static int ecw2cw(int ecw) | |||
177 | * HT abilities for a specific band. | 177 | * HT abilities for a specific band. |
178 | */ | 178 | */ |
179 | static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata, | 179 | static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata, |
180 | struct ieee80211_ht_info *hti, | 180 | struct ieee80211_ht_operation *ht_oper, |
181 | const u8 *bssid, u16 ap_ht_cap_flags, | 181 | const u8 *bssid, u16 ap_ht_cap_flags, |
182 | bool beacon_htcap_ie) | 182 | bool beacon_htcap_ie) |
183 | { | 183 | { |
@@ -185,7 +185,7 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata, | |||
185 | struct ieee80211_supported_band *sband; | 185 | struct ieee80211_supported_band *sband; |
186 | struct sta_info *sta; | 186 | struct sta_info *sta; |
187 | u32 changed = 0; | 187 | u32 changed = 0; |
188 | int hti_cfreq; | 188 | int ht_cfreq; |
189 | u16 ht_opmode; | 189 | u16 ht_opmode; |
190 | bool enable_ht = true; | 190 | bool enable_ht = true; |
191 | enum nl80211_channel_type prev_chantype; | 191 | enum nl80211_channel_type prev_chantype; |
@@ -196,10 +196,10 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata, | |||
196 | prev_chantype = sdata->vif.bss_conf.channel_type; | 196 | prev_chantype = sdata->vif.bss_conf.channel_type; |
197 | 197 | ||
198 | 198 | ||
199 | hti_cfreq = ieee80211_channel_to_frequency(hti->control_chan, | 199 | ht_cfreq = ieee80211_channel_to_frequency(ht_oper->primary_chan, |
200 | sband->band); | 200 | sband->band); |
201 | /* check that channel matches the right operating channel */ | 201 | /* check that channel matches the right operating channel */ |
202 | if (local->hw.conf.channel->center_freq != hti_cfreq) { | 202 | if (local->hw.conf.channel->center_freq != ht_cfreq) { |
203 | /* Some APs mess this up, evidently. | 203 | /* Some APs mess this up, evidently. |
204 | * Netgear WNDR3700 sometimes reports 4 higher than | 204 | * Netgear WNDR3700 sometimes reports 4 higher than |
205 | * the actual channel, for instance. | 205 | * the actual channel, for instance. |
@@ -207,11 +207,11 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata, | |||
207 | printk(KERN_DEBUG | 207 | printk(KERN_DEBUG |
208 | "%s: Wrong control channel in association" | 208 | "%s: Wrong control channel in association" |
209 | " response: configured center-freq: %d" | 209 | " response: configured center-freq: %d" |
210 | " hti-cfreq: %d hti->control_chan: %d" | 210 | " ht-cfreq: %d ht->control_chan: %d" |
211 | " band: %d. Disabling HT.\n", | 211 | " band: %d. Disabling HT.\n", |
212 | sdata->name, | 212 | sdata->name, |
213 | local->hw.conf.channel->center_freq, | 213 | local->hw.conf.channel->center_freq, |
214 | hti_cfreq, hti->control_chan, | 214 | ht_cfreq, ht_oper->primary_chan, |
215 | sband->band); | 215 | sband->band); |
216 | enable_ht = false; | 216 | enable_ht = false; |
217 | } | 217 | } |
@@ -222,8 +222,9 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata, | |||
222 | if (!(ap_ht_cap_flags & IEEE80211_HT_CAP_40MHZ_INTOLERANT) && | 222 | if (!(ap_ht_cap_flags & IEEE80211_HT_CAP_40MHZ_INTOLERANT) && |
223 | !ieee80111_cfg_override_disables_ht40(sdata) && | 223 | !ieee80111_cfg_override_disables_ht40(sdata) && |
224 | (sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) && | 224 | (sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) && |
225 | (hti->ht_param & IEEE80211_HT_PARAM_CHAN_WIDTH_ANY)) { | 225 | (ht_oper->ht_param & IEEE80211_HT_PARAM_CHAN_WIDTH_ANY)) { |
226 | switch(hti->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET) { | 226 | switch (ht_oper->ht_param & |
227 | IEEE80211_HT_PARAM_CHA_SEC_OFFSET) { | ||
227 | case IEEE80211_HT_PARAM_CHA_SEC_ABOVE: | 228 | case IEEE80211_HT_PARAM_CHA_SEC_ABOVE: |
228 | rx_channel_type = NL80211_CHAN_HT40PLUS; | 229 | rx_channel_type = NL80211_CHAN_HT40PLUS; |
229 | break; | 230 | break; |
@@ -278,7 +279,7 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata, | |||
278 | IEEE80211_QUEUE_STOP_REASON_CHTYPE_CHANGE); | 279 | IEEE80211_QUEUE_STOP_REASON_CHTYPE_CHANGE); |
279 | } | 280 | } |
280 | 281 | ||
281 | ht_opmode = le16_to_cpu(hti->operation_mode); | 282 | ht_opmode = le16_to_cpu(ht_oper->operation_mode); |
282 | 283 | ||
283 | /* if bss configuration changed store the new one */ | 284 | /* if bss configuration changed store the new one */ |
284 | if (sdata->ht_opmode_valid != enable_ht || | 285 | if (sdata->ht_opmode_valid != enable_ht || |
@@ -316,12 +317,12 @@ static int ieee80211_compatible_rates(const u8 *supp_rates, int supp_rates_len, | |||
316 | } | 317 | } |
317 | 318 | ||
318 | static void ieee80211_add_ht_ie(struct ieee80211_sub_if_data *sdata, | 319 | static void ieee80211_add_ht_ie(struct ieee80211_sub_if_data *sdata, |
319 | struct sk_buff *skb, const u8 *ht_info_ie, | 320 | struct sk_buff *skb, const u8 *ht_oper_ie, |
320 | struct ieee80211_supported_band *sband, | 321 | struct ieee80211_supported_band *sband, |
321 | struct ieee80211_channel *channel, | 322 | struct ieee80211_channel *channel, |
322 | enum ieee80211_smps_mode smps) | 323 | enum ieee80211_smps_mode smps) |
323 | { | 324 | { |
324 | struct ieee80211_ht_info *ht_info; | 325 | struct ieee80211_ht_operation *ht_oper; |
325 | u8 *pos; | 326 | u8 *pos; |
326 | u32 flags = channel->flags; | 327 | u32 flags = channel->flags; |
327 | u16 cap; | 328 | u16 cap; |
@@ -329,21 +330,21 @@ static void ieee80211_add_ht_ie(struct ieee80211_sub_if_data *sdata, | |||
329 | 330 | ||
330 | BUILD_BUG_ON(sizeof(ht_cap) != sizeof(sband->ht_cap)); | 331 | BUILD_BUG_ON(sizeof(ht_cap) != sizeof(sband->ht_cap)); |
331 | 332 | ||
332 | if (!ht_info_ie) | 333 | if (!ht_oper_ie) |
333 | return; | 334 | return; |
334 | 335 | ||
335 | if (ht_info_ie[1] < sizeof(struct ieee80211_ht_info)) | 336 | if (ht_oper_ie[1] < sizeof(struct ieee80211_ht_operation)) |
336 | return; | 337 | return; |
337 | 338 | ||
338 | memcpy(&ht_cap, &sband->ht_cap, sizeof(ht_cap)); | 339 | memcpy(&ht_cap, &sband->ht_cap, sizeof(ht_cap)); |
339 | ieee80211_apply_htcap_overrides(sdata, &ht_cap); | 340 | ieee80211_apply_htcap_overrides(sdata, &ht_cap); |
340 | 341 | ||
341 | ht_info = (struct ieee80211_ht_info *)(ht_info_ie + 2); | 342 | ht_oper = (struct ieee80211_ht_operation *)(ht_oper_ie + 2); |
342 | 343 | ||
343 | /* determine capability flags */ | 344 | /* determine capability flags */ |
344 | cap = ht_cap.cap; | 345 | cap = ht_cap.cap; |
345 | 346 | ||
346 | switch (ht_info->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET) { | 347 | switch (ht_oper->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET) { |
347 | case IEEE80211_HT_PARAM_CHA_SEC_ABOVE: | 348 | case IEEE80211_HT_PARAM_CHA_SEC_ABOVE: |
348 | if (flags & IEEE80211_CHAN_NO_HT40PLUS) { | 349 | if (flags & IEEE80211_CHAN_NO_HT40PLUS) { |
349 | cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40; | 350 | cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40; |
@@ -557,7 +558,7 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata) | |||
557 | } | 558 | } |
558 | 559 | ||
559 | if (!(ifmgd->flags & IEEE80211_STA_DISABLE_11N)) | 560 | if (!(ifmgd->flags & IEEE80211_STA_DISABLE_11N)) |
560 | ieee80211_add_ht_ie(sdata, skb, assoc_data->ht_information_ie, | 561 | ieee80211_add_ht_ie(sdata, skb, assoc_data->ht_operation_ie, |
561 | sband, local->oper_channel, ifmgd->ap_smps); | 562 | sband, local->oper_channel, ifmgd->ap_smps); |
562 | 563 | ||
563 | /* if present, add any custom non-vendor IEs that go after HT */ | 564 | /* if present, add any custom non-vendor IEs that go after HT */ |
@@ -2094,9 +2095,9 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata, | |||
2094 | ieee80211_set_wmm_default(sdata, false); | 2095 | ieee80211_set_wmm_default(sdata, false); |
2095 | changed |= BSS_CHANGED_QOS; | 2096 | changed |= BSS_CHANGED_QOS; |
2096 | 2097 | ||
2097 | if (elems.ht_info_elem && elems.wmm_param && | 2098 | if (elems.ht_operation && elems.wmm_param && |
2098 | !(ifmgd->flags & IEEE80211_STA_DISABLE_11N)) | 2099 | !(ifmgd->flags & IEEE80211_STA_DISABLE_11N)) |
2099 | changed |= ieee80211_enable_ht(sdata, elems.ht_info_elem, | 2100 | changed |= ieee80211_enable_ht(sdata, elems.ht_operation, |
2100 | cbss->bssid, ap_ht_cap_flags, | 2101 | cbss->bssid, ap_ht_cap_flags, |
2101 | false); | 2102 | false); |
2102 | 2103 | ||
@@ -2321,7 +2322,7 @@ static const u64 care_about_ies = | |||
2321 | (1ULL << WLAN_EID_CHANNEL_SWITCH) | | 2322 | (1ULL << WLAN_EID_CHANNEL_SWITCH) | |
2322 | (1ULL << WLAN_EID_PWR_CONSTRAINT) | | 2323 | (1ULL << WLAN_EID_PWR_CONSTRAINT) | |
2323 | (1ULL << WLAN_EID_HT_CAPABILITY) | | 2324 | (1ULL << WLAN_EID_HT_CAPABILITY) | |
2324 | (1ULL << WLAN_EID_HT_INFORMATION); | 2325 | (1ULL << WLAN_EID_HT_OPERATION); |
2325 | 2326 | ||
2326 | static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata, | 2327 | static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata, |
2327 | struct ieee80211_mgmt *mgmt, | 2328 | struct ieee80211_mgmt *mgmt, |
@@ -2506,7 +2507,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata, | |||
2506 | erp_valid, erp_value); | 2507 | erp_valid, erp_value); |
2507 | 2508 | ||
2508 | 2509 | ||
2509 | if (elems.ht_cap_elem && elems.ht_info_elem && elems.wmm_param && | 2510 | if (elems.ht_cap_elem && elems.ht_operation && elems.wmm_param && |
2510 | !(ifmgd->flags & IEEE80211_STA_DISABLE_11N)) { | 2511 | !(ifmgd->flags & IEEE80211_STA_DISABLE_11N)) { |
2511 | struct sta_info *sta; | 2512 | struct sta_info *sta; |
2512 | struct ieee80211_supported_band *sband; | 2513 | struct ieee80211_supported_band *sband; |
@@ -2529,7 +2530,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata, | |||
2529 | 2530 | ||
2530 | rcu_read_unlock(); | 2531 | rcu_read_unlock(); |
2531 | 2532 | ||
2532 | changed |= ieee80211_enable_ht(sdata, elems.ht_info_elem, | 2533 | changed |= ieee80211_enable_ht(sdata, elems.ht_operation, |
2533 | bssid, ap_ht_cap_flags, true); | 2534 | bssid, ap_ht_cap_flags, true); |
2534 | } | 2535 | } |
2535 | 2536 | ||
@@ -3339,8 +3340,8 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, | |||
3339 | assoc_data->wmm = bss->wmm_used && (local->hw.queues >= 4); | 3340 | assoc_data->wmm = bss->wmm_used && (local->hw.queues >= 4); |
3340 | assoc_data->supp_rates = bss->supp_rates; | 3341 | assoc_data->supp_rates = bss->supp_rates; |
3341 | assoc_data->supp_rates_len = bss->supp_rates_len; | 3342 | assoc_data->supp_rates_len = bss->supp_rates_len; |
3342 | assoc_data->ht_information_ie = | 3343 | assoc_data->ht_operation_ie = |
3343 | ieee80211_bss_get_ie(req->bss, WLAN_EID_HT_INFORMATION); | 3344 | ieee80211_bss_get_ie(req->bss, WLAN_EID_HT_OPERATION); |
3344 | 3345 | ||
3345 | if (bss->wmm_used && bss->uapsd_supported && | 3346 | if (bss->wmm_used && bss->uapsd_supported && |
3346 | (sdata->local->hw.flags & IEEE80211_HW_SUPPORTS_UAPSD)) { | 3347 | (sdata->local->hw.flags & IEEE80211_HW_SUPPORTS_UAPSD)) { |
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 782a60198df4..a9b27273320e 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -2390,7 +2390,7 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw, | |||
2390 | 2 + 3 + /* DS params */ | 2390 | 2 + 3 + /* DS params */ |
2391 | 2 + (IEEE80211_MAX_SUPP_RATES - 8) + | 2391 | 2 + (IEEE80211_MAX_SUPP_RATES - 8) + |
2392 | 2 + sizeof(struct ieee80211_ht_cap) + | 2392 | 2 + sizeof(struct ieee80211_ht_cap) + |
2393 | 2 + sizeof(struct ieee80211_ht_info) + | 2393 | 2 + sizeof(struct ieee80211_ht_operation) + |
2394 | 2 + sdata->u.mesh.mesh_id_len + | 2394 | 2 + sdata->u.mesh.mesh_id_len + |
2395 | 2 + sizeof(struct ieee80211_meshconf_ie) + | 2395 | 2 + sizeof(struct ieee80211_meshconf_ie) + |
2396 | sdata->u.mesh.ie_len); | 2396 | sdata->u.mesh.ie_len); |
@@ -2419,7 +2419,7 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw, | |||
2419 | ieee80211_add_ext_srates_ie(&sdata->vif, skb) || | 2419 | ieee80211_add_ext_srates_ie(&sdata->vif, skb) || |
2420 | mesh_add_rsn_ie(skb, sdata) || | 2420 | mesh_add_rsn_ie(skb, sdata) || |
2421 | mesh_add_ht_cap_ie(skb, sdata) || | 2421 | mesh_add_ht_cap_ie(skb, sdata) || |
2422 | mesh_add_ht_info_ie(skb, sdata) || | 2422 | mesh_add_ht_oper_ie(skb, sdata) || |
2423 | mesh_add_meshid_ie(skb, sdata) || | 2423 | mesh_add_meshid_ie(skb, sdata) || |
2424 | mesh_add_meshconf_ie(skb, sdata) || | 2424 | mesh_add_meshconf_ie(skb, sdata) || |
2425 | mesh_add_vendor_ies(skb, sdata)) { | 2425 | mesh_add_vendor_ies(skb, sdata)) { |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 32f7a3b3d43c..5e23cf6389d0 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -684,9 +684,9 @@ u32 ieee802_11_parse_elems_crc(u8 *start, size_t len, | |||
684 | else | 684 | else |
685 | elem_parse_failed = true; | 685 | elem_parse_failed = true; |
686 | break; | 686 | break; |
687 | case WLAN_EID_HT_INFORMATION: | 687 | case WLAN_EID_HT_OPERATION: |
688 | if (elen >= sizeof(struct ieee80211_ht_info)) | 688 | if (elen >= sizeof(struct ieee80211_ht_operation)) |
689 | elems->ht_info_elem = (void *)pos; | 689 | elems->ht_operation = (void *)pos; |
690 | else | 690 | else |
691 | elem_parse_failed = true; | 691 | elem_parse_failed = true; |
692 | break; | 692 | break; |
@@ -1611,57 +1611,56 @@ u8 *ieee80211_ie_build_ht_cap(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap, | |||
1611 | return pos; | 1611 | return pos; |
1612 | } | 1612 | } |
1613 | 1613 | ||
1614 | u8 *ieee80211_ie_build_ht_info(u8 *pos, | 1614 | u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap, |
1615 | struct ieee80211_sta_ht_cap *ht_cap, | ||
1616 | struct ieee80211_channel *channel, | 1615 | struct ieee80211_channel *channel, |
1617 | enum nl80211_channel_type channel_type) | 1616 | enum nl80211_channel_type channel_type) |
1618 | { | 1617 | { |
1619 | struct ieee80211_ht_info *ht_info; | 1618 | struct ieee80211_ht_operation *ht_oper; |
1620 | /* Build HT Information */ | 1619 | /* Build HT Information */ |
1621 | *pos++ = WLAN_EID_HT_INFORMATION; | 1620 | *pos++ = WLAN_EID_HT_OPERATION; |
1622 | *pos++ = sizeof(struct ieee80211_ht_info); | 1621 | *pos++ = sizeof(struct ieee80211_ht_operation); |
1623 | ht_info = (struct ieee80211_ht_info *)pos; | 1622 | ht_oper = (struct ieee80211_ht_operation *)pos; |
1624 | ht_info->control_chan = | 1623 | ht_oper->primary_chan = |
1625 | ieee80211_frequency_to_channel(channel->center_freq); | 1624 | ieee80211_frequency_to_channel(channel->center_freq); |
1626 | switch (channel_type) { | 1625 | switch (channel_type) { |
1627 | case NL80211_CHAN_HT40MINUS: | 1626 | case NL80211_CHAN_HT40MINUS: |
1628 | ht_info->ht_param = IEEE80211_HT_PARAM_CHA_SEC_BELOW; | 1627 | ht_oper->ht_param = IEEE80211_HT_PARAM_CHA_SEC_BELOW; |
1629 | break; | 1628 | break; |
1630 | case NL80211_CHAN_HT40PLUS: | 1629 | case NL80211_CHAN_HT40PLUS: |
1631 | ht_info->ht_param = IEEE80211_HT_PARAM_CHA_SEC_ABOVE; | 1630 | ht_oper->ht_param = IEEE80211_HT_PARAM_CHA_SEC_ABOVE; |
1632 | break; | 1631 | break; |
1633 | case NL80211_CHAN_HT20: | 1632 | case NL80211_CHAN_HT20: |
1634 | default: | 1633 | default: |
1635 | ht_info->ht_param = IEEE80211_HT_PARAM_CHA_SEC_NONE; | 1634 | ht_oper->ht_param = IEEE80211_HT_PARAM_CHA_SEC_NONE; |
1636 | break; | 1635 | break; |
1637 | } | 1636 | } |
1638 | if (ht_cap->cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) | 1637 | if (ht_cap->cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) |
1639 | ht_info->ht_param |= IEEE80211_HT_PARAM_CHAN_WIDTH_ANY; | 1638 | ht_oper->ht_param |= IEEE80211_HT_PARAM_CHAN_WIDTH_ANY; |
1640 | 1639 | ||
1641 | /* | 1640 | /* |
1642 | * Note: According to 802.11n-2009 9.13.3.1, HT Protection field and | 1641 | * Note: According to 802.11n-2009 9.13.3.1, HT Protection field and |
1643 | * RIFS Mode are reserved in IBSS mode, therefore keep them at 0 | 1642 | * RIFS Mode are reserved in IBSS mode, therefore keep them at 0 |
1644 | */ | 1643 | */ |
1645 | ht_info->operation_mode = 0x0000; | 1644 | ht_oper->operation_mode = 0x0000; |
1646 | ht_info->stbc_param = 0x0000; | 1645 | ht_oper->stbc_param = 0x0000; |
1647 | 1646 | ||
1648 | /* It seems that Basic MCS set and Supported MCS set | 1647 | /* It seems that Basic MCS set and Supported MCS set |
1649 | are identical for the first 10 bytes */ | 1648 | are identical for the first 10 bytes */ |
1650 | memset(&ht_info->basic_set, 0, 16); | 1649 | memset(&ht_oper->basic_set, 0, 16); |
1651 | memcpy(&ht_info->basic_set, &ht_cap->mcs, 10); | 1650 | memcpy(&ht_oper->basic_set, &ht_cap->mcs, 10); |
1652 | 1651 | ||
1653 | return pos + sizeof(struct ieee80211_ht_info); | 1652 | return pos + sizeof(struct ieee80211_ht_operation); |
1654 | } | 1653 | } |
1655 | 1654 | ||
1656 | enum nl80211_channel_type | 1655 | enum nl80211_channel_type |
1657 | ieee80211_ht_info_to_channel_type(struct ieee80211_ht_info *ht_info) | 1656 | ieee80211_ht_oper_to_channel_type(struct ieee80211_ht_operation *ht_oper) |
1658 | { | 1657 | { |
1659 | enum nl80211_channel_type channel_type; | 1658 | enum nl80211_channel_type channel_type; |
1660 | 1659 | ||
1661 | if (!ht_info) | 1660 | if (!ht_oper) |
1662 | return NL80211_CHAN_NO_HT; | 1661 | return NL80211_CHAN_NO_HT; |
1663 | 1662 | ||
1664 | switch (ht_info->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET) { | 1663 | switch (ht_oper->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET) { |
1665 | case IEEE80211_HT_PARAM_CHA_SEC_NONE: | 1664 | case IEEE80211_HT_PARAM_CHA_SEC_NONE: |
1666 | channel_type = NL80211_CHAN_HT20; | 1665 | channel_type = NL80211_CHAN_HT20; |
1667 | break; | 1666 | break; |