diff options
| author | Selvaraj, Sridhar <sselvara@qti.qualcomm.com> | 2016-05-04 19:47:24 +0530 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-05-05 13:05:21 +0530 |
| commit | 5716d9290f095a4af6d25810f5da810c1e1b1ea7 (patch) | |
| tree | ef1c4b6a64f583cb077dc72eaf60638866fcf485 | |
| parent | 5819205f39c834654a707410ef63512949a454b0 (diff) | |
qcacld-2.0: Update RRM scan results to user space
Currently RRM scan results are sent out to the requesting AP, but
are not updated to the kernel.
Update the results to the kernel so that it will be useful in future
in the userspace if a BTM request is received and the lookup of
scan cache can fetch a result for the target AP and an additional
scan can be avoided.
Change-Id: Ie56b86e5c54910648cb2ae8bf2a7dac2ee873e00
CRs-Fixed: 1010596
| -rw-r--r-- | CORE/HDD/inc/wlan_hdd_cfg80211.h | 2 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_assoc.c | 16 | ||||
| -rw-r--r-- | CORE/SME/inc/csrApi.h | 1 | ||||
| -rw-r--r-- | CORE/SME/src/rrm/sme_rrm.c | 14 |
4 files changed, 33 insertions, 0 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_cfg80211.h b/CORE/HDD/inc/wlan_hdd_cfg80211.h index 23256e602464..54174cc0aa8e 100644 --- a/CORE/HDD/inc/wlan_hdd_cfg80211.h +++ b/CORE/HDD/inc/wlan_hdd_cfg80211.h @@ -2045,4 +2045,6 @@ void wlan_hdd_clear_link_layer_stats(hdd_adapter_t *adapter); static inline void wlan_hdd_clear_link_layer_stats(hdd_adapter_t *adapter) {} #endif +struct cfg80211_bss *wlan_hdd_cfg80211_inform_bss_frame(hdd_adapter_t *pAdapter, + tSirBssDescription *bss_desc); #endif diff --git a/CORE/HDD/src/wlan_hdd_assoc.c b/CORE/HDD/src/wlan_hdd_assoc.c index b675f1c989d9..3cbb4fad133e 100644 --- a/CORE/HDD/src/wlan_hdd_assoc.c +++ b/CORE/HDD/src/wlan_hdd_assoc.c @@ -3779,6 +3779,7 @@ hdd_smeRoamCallback(void *pContext, tCsrRoamInfo *pRoamInfo, tANI_U32 roamId, hdd_station_ctx_t *pHddStaCtx = NULL; VOS_STATUS status = VOS_STATUS_SUCCESS; hdd_context_t *pHddCtx = NULL; + struct cfg80211_bss *bss_status; VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "CSR Callback: status= %d result= %d roamID=%d", roamStatus, roamResult, roamId ); @@ -4130,6 +4131,21 @@ hdd_smeRoamCallback(void *pContext, tCsrRoamInfo *pRoamInfo, tANI_U32 roamId, break; } #endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */ + case eCSR_ROAM_UPDATE_SCAN_RESULT: + if ((NULL != pRoamInfo) && (NULL != pRoamInfo->pBssDesc)) { + bss_status = wlan_hdd_cfg80211_inform_bss_frame(pAdapter, + pRoamInfo->pBssDesc); + if (NULL == bss_status) + hddLog(VOS_TRACE_LEVEL_INFO, + FL("UPDATE_SCAN_RESULT returned NULL")); + else + cfg80211_put_bss( +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) || defined(WITH_BACKPORTS) + (WLAN_HDD_GET_CTX(pAdapter))->wiphy, +#endif + bss_status); + } + break; case eCSR_ROAM_NDP_STATUS_UPDATE: hdd_ndp_event_handler(pAdapter, pRoamInfo, roamId, roamStatus, roamResult ); diff --git a/CORE/SME/inc/csrApi.h b/CORE/SME/inc/csrApi.h index 36d9e7dc0832..8e16ac07d31a 100644 --- a/CORE/SME/inc/csrApi.h +++ b/CORE/SME/inc/csrApi.h @@ -541,6 +541,7 @@ typedef enum eCSR_ROAM_EXT_CHG_CHNL_IND, eCSR_ROAM_NDP_STATUS_UPDATE, + eCSR_ROAM_UPDATE_SCAN_RESULT, }eRoamCmdStatus; diff --git a/CORE/SME/src/rrm/sme_rrm.c b/CORE/SME/src/rrm/sme_rrm.c index 9d696fc1d281..4d355653c6ae 100644 --- a/CORE/SME/src/rrm/sme_rrm.c +++ b/CORE/SME/src/rrm/sme_rrm.c @@ -469,6 +469,7 @@ static eHalStatus sme_RrmSendScanResult( tpAniSirGlobal pMac, tANI_U8 counter=0; tpRrmSMEContext pSmeRrmContext = &pMac->rrm.rrmSmeContext; tANI_U32 sessionId; + tCsrRoamInfo *roam_info; #if defined WLAN_VOWIFI_DEBUG smsLog( pMac, LOGE, "Send scan result to PE "); @@ -595,6 +596,17 @@ static eHalStatus sme_RrmSendScanResult( tpAniSirGlobal pMac, pScanResult->timer, RRM_scan_timer); if(pScanResult->timer >= RRM_scan_timer) { + roam_info = vos_mem_malloc(sizeof(*roam_info)); + if (NULL == roam_info) { + smsLog( pMac, LOGP, FL("vos_mem_malloc failed:") ); + status = eHAL_STATUS_FAILED_ALLOC; + goto rrm_send_scan_results_done; + } + vos_mem_zero(roam_info, sizeof(*roam_info)); + roam_info->pBssDesc = &pScanResult->BssDescriptor; + csrRoamCallCallback(pMac, sessionId, roam_info, 0, + eCSR_ROAM_UPDATE_SCAN_RESULT, eCSR_ROAM_RESULT_NONE); + vos_mem_free(roam_info); pScanResultsArr[counter++] = pScanResult; } pScanResult = pNextResult; //sme_ScanResultGetNext(hHal, pResult); @@ -625,6 +637,8 @@ static eHalStatus sme_RrmSendScanResult( tpAniSirGlobal pMac, pScanResultsArr, measurementDone, counter); } + +rrm_send_scan_results_done: sme_ScanResultPurge(pMac, pResult); return status; |
