]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.10.34/mwifiex-save-and-copy-ap-s-vht-capability-info-correctly.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.10.34 / mwifiex-save-and-copy-ap-s-vht-capability-info-correctly.patch
CommitLineData
7accec13
GKH
1From d51246481c7f28bbfa1f814ded2da65e531cd4b2 Mon Sep 17 00:00:00 2001
2From: Amitkumar Karwar <akarwar@marvell.com>
3Date: Tue, 4 Mar 2014 18:43:14 -0800
4Subject: mwifiex: save and copy AP's VHT capability info correctly
5
6From: Amitkumar Karwar <akarwar@marvell.com>
7
8commit d51246481c7f28bbfa1f814ded2da65e531cd4b2 upstream.
9
10While preparing association request, intersection of device's
11VHT capability information and corresponding field advertised
12by AP is used.
13
14This patch fixes a couple errors while saving and copying vht_cap
15and vht_oper fields from AP's beacon.
16
17Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
18Signed-off-by: Bing Zhao <bzhao@marvell.com>
19Signed-off-by: John W. Linville <linville@tuxdriver.com>
20Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21
22---
23 drivers/net/wireless/mwifiex/11ac.c | 3 +--
24 drivers/net/wireless/mwifiex/scan.c | 8 ++++----
25 2 files changed, 5 insertions(+), 6 deletions(-)
26
27--- a/drivers/net/wireless/mwifiex/11ac.c
28+++ b/drivers/net/wireless/mwifiex/11ac.c
29@@ -189,8 +189,7 @@ int mwifiex_cmd_append_11ac_tlv(struct m
30 vht_cap->header.len =
31 cpu_to_le16(sizeof(struct ieee80211_vht_cap));
32 memcpy((u8 *)vht_cap + sizeof(struct mwifiex_ie_types_header),
33- (u8 *)bss_desc->bcn_vht_cap +
34- sizeof(struct ieee_types_header),
35+ (u8 *)bss_desc->bcn_vht_cap,
36 le16_to_cpu(vht_cap->header.len));
37
38 mwifiex_fill_vht_cap_tlv(priv, vht_cap, bss_desc->bss_band);
39--- a/drivers/net/wireless/mwifiex/scan.c
40+++ b/drivers/net/wireless/mwifiex/scan.c
41@@ -2040,12 +2040,12 @@ mwifiex_save_curr_bcn(struct mwifiex_pri
42 curr_bss->ht_info_offset);
43
44 if (curr_bss->bcn_vht_cap)
45- curr_bss->bcn_ht_cap = (void *)(curr_bss->beacon_buf +
46- curr_bss->vht_cap_offset);
47+ curr_bss->bcn_vht_cap = (void *)(curr_bss->beacon_buf +
48+ curr_bss->vht_cap_offset);
49
50 if (curr_bss->bcn_vht_oper)
51- curr_bss->bcn_ht_oper = (void *)(curr_bss->beacon_buf +
52- curr_bss->vht_info_offset);
53+ curr_bss->bcn_vht_oper = (void *)(curr_bss->beacon_buf +
54+ curr_bss->vht_info_offset);
55
56 if (curr_bss->bcn_bss_co_2040)
57 curr_bss->bcn_bss_co_2040 =