diff options
| author | Varun Reddy Yeturu <vyeturu@qca.qualcomm.com> | 2016-02-11 16:36:39 -0800 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-02-12 16:11:40 +0530 |
| commit | c5b09017f9445f69e62684c5f6caf7ca0c41c14c (patch) | |
| tree | e20c5b51a727df53ac37c8fb0cd0e8212c19aacf | |
| parent | b1ed1172f1ea87f12a5cd510f021361c44de2a7b (diff) | |
qcacld-2.0: Disable HI_RSSI_SCAN in few scenarios
The HI_RSSI_SCAN feature is only meant to address the
scenario where user walks into a home which has dual band
AP and the 2.4G AP is visible initially and then the 5G AP
is visible later.
Disable the HI_RSSI_SCAN feature in the following cases:
1. Connection is a roaming connection
2. Connection is made with a 5G AP
3. Connection is made with a 2.4G AP, but the rssi is
stronger than the hi_rssi_lookup_threshold
CRs-Fixed: 975401
Change-Id: I86c63d9f8b51b6bdccc804163241ffe5640baf4d
| -rw-r--r-- | CORE/SME/inc/csrInternal.h | 1 | ||||
| -rw-r--r-- | CORE/SME/src/csr/csrApiRoam.c | 24 |
2 files changed, 19 insertions, 6 deletions
diff --git a/CORE/SME/inc/csrInternal.h b/CORE/SME/inc/csrInternal.h index 2336fb8f1300..7609af5c9104 100644 --- a/CORE/SME/inc/csrInternal.h +++ b/CORE/SME/inc/csrInternal.h @@ -1042,6 +1042,7 @@ typedef struct tagCsrRoamSession tCsrRoamStoredProfile stored_roam_profile; bool ch_switch_in_progress; bool supported_nss_1x1; + bool disable_hi_rssi; } tCsrRoamSession; typedef struct tagCsrRoamStruct diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c index da4239ce857c..6f77adaf0478 100644 --- a/CORE/SME/src/csr/csrApiRoam.c +++ b/CORE/SME/src/csr/csrApiRoam.c @@ -13464,6 +13464,7 @@ eHalStatus csrSendJoinReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDe tANI_U8 wpaRsnIE[DOT11F_IE_RSN_MAX_LEN]; //RSN MAX is bigger than WPA MAX tANI_U32 ucDot11Mode = 0; tANI_U8 txBFCsnValue = 0; + tpCsrNeighborRoamControlInfo neigh_roam_info; if(!pSession) { @@ -13476,6 +13477,21 @@ eHalStatus csrSendJoinReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDe smsLog(pMac, LOGE, FL(" pBssDescription is NULL")); return eHAL_STATUS_FAILURE; } + neigh_roam_info = &pMac->roam.neighborRoamInfo[sessionId]; + + if ((eWNI_SME_REASSOC_REQ == messageType) || + CSR_IS_CHANNEL_5GHZ(pBssDescription->channelId) || + (abs(pBssDescription->rssi) < + (neigh_roam_info->cfgParams.neighborLookupThreshold + + neigh_roam_info->cfgParams.hi_rssi_scan_rssi_delta))) { + pSession->disable_hi_rssi = true; + VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG, + "Disabling HI_RSSI feature, AP channel=%d, rssi=%d", + pBssDescription->channelId, pBssDescription->rssi); + } + else { + pSession->disable_hi_rssi = false; + } do { pSession->joinFailStatusCode.statusCode = eSIR_SME_SUCCESS; @@ -17509,15 +17525,11 @@ eHalStatus csrRoamOffloadScan(tpAniSirGlobal pMac, tANI_U8 sessionId, * there is no need to enable the HI_RSSI feature. This feature * is useful only if we are connected to a 2.4 GHz AP and we wish * to connect to a better 5GHz AP is available.*/ - if(CSR_IS_CHANNEL_5GHZ(op_channel)) { - VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG, - "Disabling HI_RSSI feature since the connected AP is 5GHz"); + if(pSession->disable_hi_rssi) pRequestBuf->hi_rssi_scan_rssi_delta = 0; - } - else { + else pRequestBuf->hi_rssi_scan_rssi_delta = pNeighborRoamInfo->cfgParams.hi_rssi_scan_rssi_delta; - } VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG, "hi_rssi_delta=%d, hi_rssi_max_count=%d," "hi_rssi_delay=%d, hi_rssi_ub=%d", |
