diff --git a/core/cds/src/cds_reg_service.c b/core/cds/src/cds_reg_service.c index 9d91857383..b15f99fef2 100644 --- a/core/cds/src/cds_reg_service.c +++ b/core/cds/src/cds_reg_service.c @@ -486,17 +486,27 @@ static void cds_set_5g_channel_params(uint16_t oper_ch, else ch_params->sec_ch_offset = PHY_DOUBLE_CHANNEL_HIGH_PRIMARY; + ch_params->center_freq_seg0 = - (bonded_chan_ptr2->start_ch + - bonded_chan_ptr2->end_ch)/2; - + (bonded_chan_ptr->start_ch + + bonded_chan_ptr->end_ch)/2; } - break; } - ch_params->ch_width = next_lower_bw[ch_params->ch_width]; } + if (CH_WIDTH_160MHZ == ch_params->ch_width) { + ch_params->center_freq_seg1 = ch_params->center_freq_seg0; + chan_state = cds_search_5g_bonded_channel(oper_ch, + CH_WIDTH_80MHZ, + &bonded_chan_ptr); + ch_params->center_freq_seg0 = (bonded_chan_ptr->start_ch + + bonded_chan_ptr->end_ch)/2; + } + QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO, + "ch %d ch_wd %d freq0 %d freq1 %d", oper_ch, + ch_params->ch_width, ch_params->center_freq_seg0, + ch_params->center_freq_seg1); } /** diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 00b8365073..9f2db15a95 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -6502,8 +6502,10 @@ static int wlan_hdd_set_channel(struct wiphy *wiphy, */ channel = ieee80211_frequency_to_channel(chandef->chan->center_freq); - if (NL80211_CHAN_WIDTH_80P80 == chandef->width) - channel_seg2 = ieee80211_frequency_to_channel(chandef->center_freq2); + if (NL80211_CHAN_WIDTH_80P80 == chandef->width || + NL80211_CHAN_WIDTH_160 == chandef->width) + channel_seg2 = + ieee80211_frequency_to_channel(chandef->center_freq2); else channel_seg2 = 0; diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c index c900e70089..ff2b233f2a 100644 --- a/core/mac/src/pe/lim/lim_assoc_utils.c +++ b/core/mac/src/pe/lim/lim_assoc_utils.c @@ -2260,6 +2260,11 @@ lim_add_sta(tpAniSirGlobal mac_ctx, sta_ds->vhtSupportedChannelWidthSet + 1; add_sta_params->vhtSupportedRxNss = sta_ds->vhtSupportedRxNss; + if (LIM_IS_AP_ROLE(session_entry) || + LIM_IS_P2P_DEVICE_GO(session_entry)) + add_sta_params->vhtSupportedRxNss = QDF_MIN( + add_sta_params->vhtSupportedRxNss, + session_entry->nss); add_sta_params->vhtTxBFCapable = #ifdef FEATURE_WLAN_TDLS ((STA_ENTRY_PEER == sta_ds->staType) diff --git a/core/mac/src/sys/legacy/src/utils/src/parser_api.c b/core/mac/src/sys/legacy/src/utils/src/parser_api.c index dae1f80424..1537eefe5b 100644 --- a/core/mac/src/sys/legacy/src/utils/src/parser_api.c +++ b/core/mac/src/sys/legacy/src/utils/src/parser_api.c @@ -1144,10 +1144,11 @@ populate_dot11f_vht_operation(tpAniSirGlobal pMac, pDot11f->present = 1; if (psessionEntry->ch_width > CH_WIDTH_40MHZ) { - pDot11f->chanWidth = psessionEntry->ch_width - 1; + pDot11f->chanWidth = 1; pDot11f->chanCenterFreqSeg1 = psessionEntry->ch_center_freq_seg0; - if (psessionEntry->ch_width == CH_WIDTH_80P80MHZ) + if (psessionEntry->ch_width == CH_WIDTH_80P80MHZ || + psessionEntry->ch_width == CH_WIDTH_160MHZ) pDot11f->chanCenterFreqSeg2 = psessionEntry->ch_center_freq_seg1; else