diff options
| -rw-r--r-- | CORE/MAC/src/pe/lim/limProcessActionFrame.c | 2 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c | 7 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limUtils.c | 4 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limUtils.h | 2 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/sch/schBeaconProcess.c | 20 | ||||
| -rw-r--r-- | CORE/SERVICES/WMA/wma.c | 31 | ||||
| -rw-r--r-- | CORE/SME/src/sme_common/sme_Api.c | 1 | ||||
| -rw-r--r-- | CORE/WDA/inc/legacy/halMsgApi.h | 3 |
8 files changed, 59 insertions, 11 deletions
diff --git a/CORE/MAC/src/pe/lim/limProcessActionFrame.c b/CORE/MAC/src/pe/lim/limProcessActionFrame.c index d9edc9c7b22a..210e38b7fe16 100644 --- a/CORE/MAC/src/pe/lim/limProcessActionFrame.c +++ b/CORE/MAC/src/pe/lim/limProcessActionFrame.c @@ -618,7 +618,7 @@ __limProcessOperatingModeActionFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo ch_bw = eHT_CHANNEL_WIDTH_20MHZ; } limCheckVHTOpModeChange(pMac, psessionEntry, - ch_bw, + ch_bw, MODE_MAX, pSta->staIndex, pHdr->sa); } diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c index 8e9abca3c75a..866f7b648c6b 100644 --- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c +++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c @@ -60,7 +60,7 @@ #include "regdomain_common.h" #include "rrmApi.h" #include "nan_datapath.h" - +#include "wma.h" #include "sapApi.h" #if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD) @@ -5223,6 +5223,11 @@ static void __limProcessSmeSetHT2040Mode(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) vos_mem_copy(pHtOpMode->peer_mac, &pStaDs->staAddr, sizeof(tSirMacAddr)); pHtOpMode->smesessionId = sessionId; + pHtOpMode->chanMode = wma_chan_to_mode( + psessionEntry->currentOperChannel, + psessionEntry->htSecondaryChannelOffset, + psessionEntry->vhtCapability, + psessionEntry->dot11mode); msg.type = WDA_UPDATE_OP_MODE; msg.reserved = 0; diff --git a/CORE/MAC/src/pe/lim/limUtils.c b/CORE/MAC/src/pe/lim/limUtils.c index cac705450caa..626ab4bc02bc 100644 --- a/CORE/MAC/src/pe/lim/limUtils.c +++ b/CORE/MAC/src/pe/lim/limUtils.c @@ -7361,11 +7361,13 @@ void limPmfSaQueryTimerHandler(void *pMacGlobal, tANI_U32 param) #ifdef WLAN_FEATURE_11AC tANI_BOOLEAN limCheckVHTOpModeChange( tpAniSirGlobal pMac, tpPESession psessionEntry, - tANI_U8 chanWidth, tANI_U8 staId, tANI_U8 *peerMac) + tANI_U8 chanWidth, tANI_U8 chanMode, + tANI_U8 staId, tANI_U8 *peerMac) { tUpdateVHTOpMode tempParam; tempParam.opMode = chanWidth; + tempParam.chanMode = chanMode; tempParam.staId = staId; tempParam.smesessionId = psessionEntry->smeSessionId; vos_mem_copy(tempParam.peer_mac, peerMac, diff --git a/CORE/MAC/src/pe/lim/limUtils.h b/CORE/MAC/src/pe/lim/limUtils.h index 7c9635653462..9b59b41e50f6 100644 --- a/CORE/MAC/src/pe/lim/limUtils.h +++ b/CORE/MAC/src/pe/lim/limUtils.h @@ -454,7 +454,7 @@ uint32_t lim_get_max_rate_flags(tpAniSirGlobal mac_ctx, tpDphHashNode sta_ds); #ifdef WLAN_FEATURE_11AC tANI_BOOLEAN limCheckVHTOpModeChange( tpAniSirGlobal pMac, tpPESession psessionEntry, - tANI_U8 chanWidth, tANI_U8 staId, tANI_U8 *peerMac); + tANI_U8 chanWidth, tANI_U8 chanMode, tANI_U8 staId, tANI_U8 *peerMac); tANI_BOOLEAN limSetNssChange( tpAniSirGlobal pMac, tpPESession psessionEntry, tANI_U8 rxNss, tANI_U8 staId, tANI_U8 *peerMac); tANI_BOOLEAN limCheckMembershipUserPosition( tpAniSirGlobal pMac, tpPESession psessionEntry, diff --git a/CORE/MAC/src/pe/sch/schBeaconProcess.c b/CORE/MAC/src/pe/sch/schBeaconProcess.c index 4ed8aeaa202a..c6419cc25197 100644 --- a/CORE/MAC/src/pe/sch/schBeaconProcess.c +++ b/CORE/MAC/src/pe/sch/schBeaconProcess.c @@ -348,6 +348,8 @@ static void __schBeaconProcessForSession( tpAniSirGlobal pMac, tANI_U8 operMode; tANI_U8 chWidth = 0; tANI_U8 skip_opmode_update = false; + WLAN_PHY_MODE chanMode; + ePhyChanBondState chanOffset; #endif #if defined FEATURE_WLAN_ESE || defined WLAN_FEATURE_VOWIFI tPowerdBm regMax = 0,maxTxPower = 0; @@ -501,6 +503,20 @@ static void __schBeaconProcessForSession( tpAniSirGlobal pMac, if (NULL != pStaDs && (HAL_STA_INVALID_IDX != pStaDs->staIndex ) && (WNI_CFG_CHANNEL_BONDING_MODE_DISABLE != cbMode)) { + if (pBeacon->HTInfo.present && pBeacon->VHTOperation.present) { + chanOffset = limGet11ACPhyCBState(pMac, + pBeacon->channelNumber, + pBeacon->HTInfo.secondaryChannelOffset, + pBeacon->VHTOperation.chanCenterFreqSeg1, + psessionEntry); + chanMode = wma_chan_to_mode(pBeacon->channelNumber, + chanOffset, + psessionEntry->vhtCapability, + psessionEntry->dot11mode); + } else { + chanMode = MODE_MAX; + } + if (psessionEntry->vhtCapability && pBeacon->OperatingMode.present ) { operMode = pStaDs->vhtSupportedChannelWidthSet ? @@ -565,7 +581,7 @@ static void __schBeaconProcessForSession( tpAniSirGlobal pMac, chWidth = eHT_CHANNEL_WIDTH_20MHZ; } limCheckVHTOpModeChange(pMac, psessionEntry, - chWidth, + chWidth, chanMode, pStaDs->staIndex, pMh->sa); } /* Update Nss setting */ @@ -640,7 +656,7 @@ static void __schBeaconProcessForSession( tpAniSirGlobal pMac, } } limCheckVHTOpModeChange(pMac, psessionEntry, - chWidth, pStaDs->staIndex, pMh->sa); + chWidth, chanMode, pStaDs->staIndex, pMh->sa); } } diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index 4055836994bc..98090a2b7210 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -23853,11 +23853,34 @@ static void wma_finish_scan_req(tp_wma_handle wma_handle, static void wma_process_update_opmode(tp_wma_handle wma_handle, tUpdateVHTOpMode *update_vht_opmode) { - WMA_LOGD("%s: opMode = %d", __func__, update_vht_opmode->opMode); + struct wma_txrx_node *iface; + WLAN_PHY_MODE chanMode; + wmi_channel_width chanwidth; + + iface = &wma_handle->interfaces[update_vht_opmode->smesessionId]; + if (update_vht_opmode->chanMode == MODE_MAX) + chanMode = iface->chanmode; + else + chanMode = update_vht_opmode->chanMode; + + WMA_LOGD("%s: opMode = %d, chanMode = %d", + __func__, update_vht_opmode->opMode, chanMode); - wma_set_peer_param(wma_handle, update_vht_opmode->peer_mac, - WMI_PEER_CHWIDTH, update_vht_opmode->opMode, - update_vht_opmode->smesessionId); + chanwidth = chanmode_to_chanwidth(chanMode); + if (chanwidth < update_vht_opmode->opMode) { + WMA_LOGE("%s: stop changing chanwidth from %d to %d,", + __func__, + chanwidth, update_vht_opmode->opMode); + } else { + iface->chanmode = chanMode; + wma_set_peer_param(wma_handle, update_vht_opmode->peer_mac, + WMI_PEER_PHYMODE, chanMode, + update_vht_opmode->smesessionId); + + wma_set_peer_param(wma_handle, update_vht_opmode->peer_mac, + WMI_PEER_CHWIDTH, update_vht_opmode->opMode, + update_vht_opmode->smesessionId); + } } static void wma_process_update_rx_nss(tp_wma_handle wma_handle, diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c index 94a0943d824c..20abd2184049 100644 --- a/CORE/SME/src/sme_common/sme_Api.c +++ b/CORE/SME/src/sme_common/sme_Api.c @@ -14176,6 +14176,7 @@ VOS_STATUS sme_notify_ht2040_mode(tHalHandle hHal, tANI_U16 staId, vos_mem_copy(pHtOpMode->peer_mac, macAddrSTA.bytes, sizeof(tSirMacAddr)); pHtOpMode->smesessionId = sessionId; + pHtOpMode->chanMode = MODE_MAX; msg.type = WDA_UPDATE_OP_MODE; msg.reserved = 0; diff --git a/CORE/WDA/inc/legacy/halMsgApi.h b/CORE/WDA/inc/legacy/halMsgApi.h index 618c0316ffe5..baaf24e199d2 100644 --- a/CORE/WDA/inc/legacy/halMsgApi.h +++ b/CORE/WDA/inc/legacy/halMsgApi.h @@ -925,7 +925,8 @@ typedef struct #ifdef WLAN_FEATURE_11AC typedef struct { - tANI_U16 opMode; + tANI_U16 opMode; + tANI_U16 chanMode; tANI_U16 staId; tANI_U16 smesessionId; tSirMacAddr peer_mac; |
