aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvinash Patil <patila@marvell.com>2013-08-23 19:48:22 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-08-26 14:09:05 -0400
commit68f95b09c80af7a0b7a27a03227fa802d55f3616 (patch)
tree234ea174db8e37b2861ef2cc3e718ba630e5d882
parent027d3307f44c6ddccb2194474a18ff71cbff0ad9 (diff)
mwifiex: fix ext_capab IE structure definition
EXT_CAPAB_IE format involves IEEE header followed by bytestream of capabilities. Current structure has incorrect member u8 for data; fix it by defining it as u8[0]. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/mwifiex/11n.c10
-rw-r--r--drivers/net/wireless/mwifiex/fw.h2
2 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/wireless/mwifiex/11n.c b/drivers/net/wireless/mwifiex/11n.c
index 41e9d25a2d8e..b579a2e54f4b 100644
--- a/drivers/net/wireless/mwifiex/11n.c
+++ b/drivers/net/wireless/mwifiex/11n.c
@@ -292,6 +292,7 @@ mwifiex_cmd_append_11n_tlv(struct mwifiex_private *priv,
292 struct mwifiex_ie_types_extcap *ext_cap; 292 struct mwifiex_ie_types_extcap *ext_cap;
293 int ret_len = 0; 293 int ret_len = 0;
294 struct ieee80211_supported_band *sband; 294 struct ieee80211_supported_band *sband;
295 struct ieee_types_header *hdr;
295 u8 radio_type; 296 u8 radio_type;
296 297
297 if (!buffer || !*buffer) 298 if (!buffer || !*buffer)
@@ -388,17 +389,18 @@ mwifiex_cmd_append_11n_tlv(struct mwifiex_private *priv,
388 } 389 }
389 390
390 if (bss_desc->bcn_ext_cap) { 391 if (bss_desc->bcn_ext_cap) {
392 hdr = (void *)bss_desc->bcn_ext_cap;
391 ext_cap = (struct mwifiex_ie_types_extcap *) *buffer; 393 ext_cap = (struct mwifiex_ie_types_extcap *) *buffer;
392 memset(ext_cap, 0, sizeof(struct mwifiex_ie_types_extcap)); 394 memset(ext_cap, 0, sizeof(struct mwifiex_ie_types_extcap));
393 ext_cap->header.type = cpu_to_le16(WLAN_EID_EXT_CAPABILITY); 395 ext_cap->header.type = cpu_to_le16(WLAN_EID_EXT_CAPABILITY);
394 ext_cap->header.len = cpu_to_le16(sizeof(ext_cap->ext_cap)); 396 ext_cap->header.len = cpu_to_le16(hdr->len);
395 397
396 memcpy((u8 *)ext_cap + sizeof(struct mwifiex_ie_types_header), 398 memcpy((u8 *)ext_cap->ext_capab,
397 bss_desc->bcn_ext_cap + sizeof(struct ieee_types_header), 399 bss_desc->bcn_ext_cap + sizeof(struct ieee_types_header),
398 le16_to_cpu(ext_cap->header.len)); 400 le16_to_cpu(ext_cap->header.len));
399 401
400 *buffer += sizeof(struct mwifiex_ie_types_extcap); 402 *buffer += sizeof(struct mwifiex_ie_types_extcap) + hdr->len;
401 ret_len += sizeof(struct mwifiex_ie_types_extcap); 403 ret_len += sizeof(struct mwifiex_ie_types_extcap) + hdr->len;
402 } 404 }
403 405
404 return ret_len; 406 return ret_len;
diff --git a/drivers/net/wireless/mwifiex/fw.h b/drivers/net/wireless/mwifiex/fw.h
index c9ad1c0d338d..f80f30b6160e 100644
--- a/drivers/net/wireless/mwifiex/fw.h
+++ b/drivers/net/wireless/mwifiex/fw.h
@@ -1330,7 +1330,7 @@ struct mwifiex_ie_types_2040bssco {
1330 1330
1331struct mwifiex_ie_types_extcap { 1331struct mwifiex_ie_types_extcap {
1332 struct mwifiex_ie_types_header header; 1332 struct mwifiex_ie_types_header header;
1333 u8 ext_cap; 1333 u8 ext_capab[0];
1334} __packed; 1334} __packed;
1335 1335
1336struct host_cmd_ds_mac_reg_access { 1336struct host_cmd_ds_mac_reg_access {