From ef3294b8e582b8d8cbb294c6dca8541fa2a18705 Mon Sep 17 00:00:00 2001 From: Krunal Soni Date: Fri, 12 Jun 2015 15:12:19 -0700 Subject: [PATCH] qcacld-3.0: Send the correct supported channel width in Assoc Resp qcacld-2.0 to qcacld-3.0 propagation Currently, if SAP supports 40Mhz, then it sends the supported channel width as 40Mhz irrespective whether STA supports or not. Changes done to check the STA capability for supported channel width and send it accordingly in Assoc Resp Change-Id: I58ca44b6998d4712521a10285b9fd2a3f825d2ed CRs-Fixed: 728676 Signed-off-by: Krunal Soni --- core/mac/src/pe/lim/lim_send_management_frames.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c index f99affbba849..f2aaf946d4b7 100644 --- a/core/mac/src/pe/lim/lim_send_management_frames.c +++ b/core/mac/src/pe/lim/lim_send_management_frames.c @@ -1202,6 +1202,18 @@ lim_send_assoc_rsp_mgmt_frame(tpAniSirGlobal mac_ctx, FL("Populate HT IEs in Assoc Response")); populate_dot11f_ht_caps(mac_ctx, pe_session, &frm.HTCaps); + /* + * Check the STA capability and + * update the HTCaps accordingly + */ + frm.HTCaps.supportedChannelWidthSet = ( + sta->htSupportedChannelWidthSet < + pe_session->htSupportedChannelWidthSet) ? + sta->htSupportedChannelWidthSet : + pe_session->htSupportedChannelWidthSet; + if (!frm.HTCaps.supportedChannelWidthSet) + frm.HTCaps.shortGI40MHz = 0; + populate_dot11f_ht_info(mac_ctx, &frm.HTInfo, pe_session); }