diff --git a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c index c33d293642d4..48284f361ab9 100644 --- a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c +++ b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c @@ -1402,13 +1402,18 @@ static bool lim_update_sta_ds(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr, (sta_ds->htSupportedChannelWidthSet) ? session->htSecondaryChannelOffset : 0; if (assoc_req->operMode.present) { + enum phy_ch_width ch_width; + + ch_width = assoc_req->operMode.chanWidth; + if (session->ch_width < ch_width) + ch_width = session->ch_width; + sta_ds->vhtSupportedChannelWidthSet = - (uint8_t) ((assoc_req->operMode.chanWidth == - eHT_CHANNEL_WIDTH_80MHZ) ? + (uint8_t) ((ch_width == CH_WIDTH_80MHZ) ? WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ : WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ); sta_ds->htSupportedChannelWidthSet = - (uint8_t) (assoc_req->operMode.chanWidth ? + (uint8_t) (ch_width ? eHT_CHANNEL_WIDTH_40MHZ : eHT_CHANNEL_WIDTH_20MHZ); } else if ((vht_caps != NULL) && vht_caps->present) { @@ -1432,6 +1437,11 @@ static bool lim_update_sta_ds(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr, session->htSupportedChannelWidthSet) ? sta_ds->htSupportedChannelWidthSet : session->htSupportedChannelWidthSet; + + if (!sta_ds->htSupportedChannelWidthSet) + sta_ds->vhtSupportedChannelWidthSet = + WNI_CFG_VHT_CHANNEL_WIDTH_20_40MHZ; + sta_ds->baPolicyFlag = 0xFF; sta_ds->htLdpcCapable = (uint8_t) assoc_req->HTCaps.advCodingCap; diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c index 5102100dba75..0e3349f9ab76 100644 --- a/core/wma/src/wma_mgmt.c +++ b/core/wma/src/wma_mgmt.c @@ -1225,6 +1225,13 @@ QDF_STATUS wma_send_peer_assoc(tp_wma_handle wma, qdf_mem_zero(cmd, sizeof(struct peer_assoc_params)); is_he = wma_is_peer_he_capable(params); + if ((params->ch_width > CH_WIDTH_40MHZ) && + ((nw_type == eSIR_11G_NW_TYPE) || + (nw_type == eSIR_11B_NW_TYPE))) { + WMA_LOGE("ch_width %d sent in 11G, configure to 40MHz", + params->ch_width); + params->ch_width = CH_WIDTH_40MHZ; + } phymode = wma_peer_phymode(nw_type, params->staType, params->htCapable, params->ch_width, params->vhtCapable, is_he);