summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/util.c
diff options
context:
space:
mode:
authorZhaoyang Liu2015-04-13 18:02:25 +0200
committerKalle Valo2015-05-09 15:25:21 +0200
commit9ab7b5b9b16025dab62b0f2c8d7f54cfce76e9c1 (patch)
treea17c2c547b12795c545cd0ea8325756a70678ca5 /drivers/net/wireless/mwifiex/util.c
parentrevert "mwifiex: enable aggregation for TID 6 and 7 streams" (diff)
downloadkernel-qcow2-linux-9ab7b5b9b16025dab62b0f2c8d7f54cfce76e9c1.tar.gz
kernel-qcow2-linux-9ab7b5b9b16025dab62b0f2c8d7f54cfce76e9c1.tar.xz
kernel-qcow2-linux-9ab7b5b9b16025dab62b0f2c8d7f54cfce76e9c1.zip
mwifiex: fix invalid HT IE configuration in FW
This patch fixes an issue where it was discovered that driver is setting invalid HT IEs to FW. This was happening because bug in parsing HT IE. Driver would incorrectly point to start of HT IE while FW only needs actual HT configuration - excluding EID and length. Signed-off-by: Zhaoyang Liu <liuzy@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mwifiex/util.c')
-rw-r--r--drivers/net/wireless/mwifiex/util.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwifiex/util.c b/drivers/net/wireless/mwifiex/util.c
index b8a45872354d..9482d955c384 100644
--- a/drivers/net/wireless/mwifiex/util.c
+++ b/drivers/net/wireless/mwifiex/util.c
@@ -536,13 +536,16 @@ void
mwifiex_set_sta_ht_cap(struct mwifiex_private *priv, const u8 *ies,
int ies_len, struct mwifiex_sta_node *node)
{
+ struct ieee_types_header *ht_cap_ie;
const struct ieee80211_ht_cap *ht_cap;
if (!ies)
return;
- ht_cap = (void *)cfg80211_find_ie(WLAN_EID_HT_CAPABILITY, ies, ies_len);
- if (ht_cap) {
+ ht_cap_ie = (void *)cfg80211_find_ie(WLAN_EID_HT_CAPABILITY, ies,
+ ies_len);
+ if (ht_cap_ie) {
+ ht_cap = (void *)(ht_cap_ie + 1);
node->is_11n_enabled = 1;
node->max_amsdu = le16_to_cpu(ht_cap->cap_info) &
IEEE80211_HT_CAP_MAX_AMSDU ?