Skip to content

Commit

Permalink
mwifiex: save and copy AP's VHT capability info correctly
Browse files Browse the repository at this point in the history
While preparing association request, intersection of device's
VHT capability information and corresponding field advertised
by AP is used.

This patch fixes a couple errors while saving and copying vht_cap
and vht_oper fields from AP's beacon.

Cc: <stable@vger.kernel.org> # 3.9+
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Amitkumar Karwar authored and John W. Linville committed Mar 6, 2014
1 parent c99b186 commit d512464
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions drivers/net/wireless/mwifiex/11ac.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,7 @@ int mwifiex_cmd_append_11ac_tlv(struct mwifiex_private *priv,
vht_cap->header.len =
cpu_to_le16(sizeof(struct ieee80211_vht_cap));
memcpy((u8 *)vht_cap + sizeof(struct mwifiex_ie_types_header),
(u8 *)bss_desc->bcn_vht_cap +
sizeof(struct ieee_types_header),
(u8 *)bss_desc->bcn_vht_cap,
le16_to_cpu(vht_cap->header.len));

mwifiex_fill_vht_cap_tlv(priv, vht_cap, bss_desc->bss_band);
Expand Down
8 changes: 4 additions & 4 deletions drivers/net/wireless/mwifiex/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2101,12 +2101,12 @@ mwifiex_save_curr_bcn(struct mwifiex_private *priv)
curr_bss->ht_info_offset);

if (curr_bss->bcn_vht_cap)
curr_bss->bcn_ht_cap = (void *)(curr_bss->beacon_buf +
curr_bss->vht_cap_offset);
curr_bss->bcn_vht_cap = (void *)(curr_bss->beacon_buf +
curr_bss->vht_cap_offset);

if (curr_bss->bcn_vht_oper)
curr_bss->bcn_ht_oper = (void *)(curr_bss->beacon_buf +
curr_bss->vht_info_offset);
curr_bss->bcn_vht_oper = (void *)(curr_bss->beacon_buf +
curr_bss->vht_info_offset);

if (curr_bss->bcn_bss_co_2040)
curr_bss->bcn_bss_co_2040 =
Expand Down

0 comments on commit d512464

Please sign in to comment.