From: Amitkumar Karwar Date: Wed, 5 Mar 2014 02:43:13 +0000 (-0800) Subject: mwifiex: copy AP's HT capability info correctly X-Git-Tag: upstream/snapshot3+hdmi~3264^2~21^2^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c99b1861c232e1f641f13b8645e0febb3712cc71;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git mwifiex: copy AP's HT capability info correctly While preparing association request, intersection of device's HT capability information and corresponding fields advertised by AP is used. This patch fixes an error while copying this field from AP's beacon. Cc: Signed-off-by: Amitkumar Karwar Signed-off-by: Bing Zhao Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/mwifiex/11n.c b/drivers/net/wireless/mwifiex/11n.c index 6261f8c..7db1a89 100644 --- a/drivers/net/wireless/mwifiex/11n.c +++ b/drivers/net/wireless/mwifiex/11n.c @@ -308,8 +308,7 @@ mwifiex_cmd_append_11n_tlv(struct mwifiex_private *priv, ht_cap->header.len = cpu_to_le16(sizeof(struct ieee80211_ht_cap)); memcpy((u8 *) ht_cap + sizeof(struct mwifiex_ie_types_header), - (u8 *) bss_desc->bcn_ht_cap + - sizeof(struct ieee_types_header), + (u8 *)bss_desc->bcn_ht_cap, le16_to_cpu(ht_cap->header.len)); mwifiex_fill_cap_info(priv, radio_type, ht_cap);