qcacld-3.0: Update dot11_mode based on target channel during chan switch
Currently if the dot11_mode is set to eCSR_DOT11_MODE_11g or eCSR_DOT11_MODE_11g_ONLY and a channel switch is triggered with target channel in 5Ghz band, then an invalid combination of dot11_mode and channel occurs which fails the vdev_restart for channel switch. Update the dot11_mode based on the target channel and the current dot11_mode before sending the channel change request to SME. Change-Id: I2b0fa4a36f137150ee0506d62be29ede4f4e604c CRs-Fixed: 2276876
This commit is contained in:
committed by
nshrivas
parent
56bb1d24f0
commit
694bec3af7
@@ -1741,6 +1741,21 @@ QDF_STATUS wlansap_channel_change_request(struct sap_context *sapContext,
|
||||
mac_ctx = PMAC_STRUCT(hHal);
|
||||
phy_mode = sapContext->csr_roamProfile.phyMode;
|
||||
|
||||
/* Update phy_mode if the target channel is in the other band */
|
||||
if (WLAN_CHAN_IS_5GHZ(target_channel) &&
|
||||
((phy_mode == eCSR_DOT11_MODE_11g) ||
|
||||
(phy_mode == eCSR_DOT11_MODE_11g_ONLY)))
|
||||
phy_mode = eCSR_DOT11_MODE_11a;
|
||||
else if (WLAN_CHAN_IS_2GHZ(target_channel) &&
|
||||
(phy_mode == eCSR_DOT11_MODE_11a))
|
||||
phy_mode = eCSR_DOT11_MODE_11g;
|
||||
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: phy_mode: %d, target_channel: %d new phy_mode: %d",
|
||||
__func__, sapContext->csr_roamProfile.phyMode,
|
||||
target_channel, phy_mode);
|
||||
sapContext->csr_roamProfile.phyMode = phy_mode;
|
||||
|
||||
if (sapContext->csr_roamProfile.ChannelInfo.numOfChannels == 0 ||
|
||||
sapContext->csr_roamProfile.ChannelInfo.ChannelList == NULL) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
|
||||
@@ -1774,8 +1789,8 @@ QDF_STATUS wlansap_channel_change_request(struct sap_context *sapContext,
|
||||
ch_params, &sapContext->csr_roamProfile);
|
||||
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO,
|
||||
"%s: chan:%d width:%d offset:%d seg0:%d seg1:%d",
|
||||
__func__, sapContext->channel, ch_params->ch_width,
|
||||
"%s: chan:%d phy_mode %d width:%d offset:%d seg0:%d seg1:%d",
|
||||
__func__, sapContext->channel, phy_mode, ch_params->ch_width,
|
||||
ch_params->sec_ch_offset, ch_params->center_freq_seg0,
|
||||
ch_params->center_freq_seg1);
|
||||
|
||||
|
@@ -20583,6 +20583,9 @@ QDF_STATUS csr_roam_channel_change_req(tpAniSirGlobal pMac,
|
||||
¶m.operationalRateSet, sizeof(pMsg->operational_rateset));
|
||||
qdf_mem_copy(&pMsg->extended_rateset,
|
||||
¶m.extendedRateSet, sizeof(pMsg->extended_rateset));
|
||||
|
||||
sme_debug("target_chan %d ch_width %d dot11mode %d",
|
||||
pMsg->targetChannel, pMsg->ch_width, pMsg->dot11mode);
|
||||
status = umac_send_mb_message_to_mac(pMsg);
|
||||
|
||||
return status;
|
||||
|
Reference in New Issue
Block a user