diff options
| author | Edhar, Mahesh Kumar <c_medhar@qti.qualcomm.com> | 2015-02-26 17:18:35 +0530 |
|---|---|---|
| committer | AnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com> | 2015-03-04 17:07:27 +0530 |
| commit | f4c7cf4dcbd41134effbcbff404170bb7cf2f274 (patch) | |
| tree | d77f8edec7d7587788e0b86a1837b5b103b5c9ca /CORE/SAP/src/sapModule.c | |
| parent | d5a9c66a2df1159e9bfa7f84353a9a0ef6e15d79 (diff) | |
qcacld: Changes to support channel switch across the bands
Currently setChanChange IOCTL restricted only to 5Ghz band.
changes are made to allow channel switch across the bands.
Change-Id: Ifc39e5c57ff36fa816554253cdbe5e7536c882b1
CRs-Fixed: 801141
Diffstat (limited to 'CORE/SAP/src/sapModule.c')
| -rw-r--r-- | CORE/SAP/src/sapModule.c | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/CORE/SAP/src/sapModule.c b/CORE/SAP/src/sapModule.c index 6a6c0f01fb45..973a96573843 100644 --- a/CORE/SAP/src/sapModule.c +++ b/CORE/SAP/src/sapModule.c @@ -1742,28 +1742,14 @@ WLANSAP_SetChannelChangeWithCsa(v_PVOID_t pvosGCtx, v_U32_t targetChannel) pMac = PMAC_STRUCT( hHal ); /* - * Validate if the new target channel is a valid - * 5 Ghz Channel. We prefer to move to another - * channel in 5 Ghz band. - */ - if ( (targetChannel < rfChannels[RF_CHAN_36].channelNum) - || - (targetChannel > rfChannels[RF_CHAN_165].channelNum) ) - { - VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR, - "%s: Invalid Channel = %d passed,Channel not in 5GHz band", - __func__, targetChannel); - - return VOS_STATUS_E_FAULT; - } - - /* * Now, validate if the passed channel is valid in the * current regulatory domain. */ - if ( (vos_nv_getChannelEnabledState(targetChannel) == NV_CHANNEL_ENABLE) + if ( sapContext->channel != targetChannel && + ((vos_nv_getChannelEnabledState(targetChannel) == NV_CHANNEL_ENABLE) || - (vos_nv_getChannelEnabledState(targetChannel) == NV_CHANNEL_DFS) ) + (vos_nv_getChannelEnabledState(targetChannel) == NV_CHANNEL_DFS && + !vos_concurrent_open_sessions_running())) ) { /* * Post a CSA IE request to SAP state machine with @@ -1778,6 +1764,8 @@ WLANSAP_SetChannelChangeWithCsa(v_PVOID_t pvosGCtx, v_U32_t targetChannel) * to sap context. */ pMac->sap.SapDfsInfo.target_channel = targetChannel; + pMac->sap.SapDfsInfo.new_chanWidth = + sapContext->vht_ch_width_orig; /* * Set the CSA IE required flag. @@ -3030,6 +3018,7 @@ WLANSAP_ChannelChangeRequest(v_PVOID_t pSapCtx, tANI_U8 tArgetChannel) } pMac = PMAC_STRUCT( hHal ); phyMode = sapContext->csrRoamProfile.phyMode; + sapContext->csrRoamProfile.ChannelInfo.ChannelList[0] = tArgetChannel; /* * We are getting channel bonding mode from sapDfsInfor structure * because we've implemented channel width fallback mechanism for DFS @@ -3038,10 +3027,10 @@ WLANSAP_ChannelChangeRequest(v_PVOID_t pSapCtx, tANI_U8 tArgetChannel) cbMode = pMac->sap.SapDfsInfo.new_cbMode; vhtChannelWidth = pMac->sap.SapDfsInfo.new_chanWidth; sme_SelectCBMode(hHal, phyMode, tArgetChannel, &vhtChannelWidth); + sapContext->csrRoamProfile.vht_channel_width = vhtChannelWidth; sapContext->vht_channel_width = vhtChannelWidth; halStatus = sme_RoamChannelChangeReq(hHal, sapContext->bssid, - tArgetChannel, - phyMode, cbMode, vhtChannelWidth); + cbMode, &sapContext->csrRoamProfile); if (halStatus == eHAL_STATUS_SUCCESS) { |
