diff options
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_assoc.c | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/CORE/HDD/src/wlan_hdd_assoc.c b/CORE/HDD/src/wlan_hdd_assoc.c index 4039d7f56d1d..ff18df1d98e5 100644 --- a/CORE/HDD/src/wlan_hdd_assoc.c +++ b/CORE/HDD/src/wlan_hdd_assoc.c @@ -2652,6 +2652,35 @@ eHalStatus hdd_RoamTdlsStatusUpdateHandler(hdd_adapter_t *pAdapter, } #endif +static void iw_full_power_cbfn (void *pContext, eHalStatus status) +{ + hdd_adapter_t *pAdapter = (hdd_adapter_t *)pContext; + hdd_context_t *pHddCtx = NULL; + int ret; + + if ((NULL == pAdapter) || (WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic)) + { + hddLog(VOS_TRACE_LEVEL_ERROR, + "%s: Bad param, pAdapter [%p]", + __func__, pAdapter); + return; + } + + pHddCtx = WLAN_HDD_GET_CTX(pAdapter); + ret = wlan_hdd_validate_context(pHddCtx); + if (0 != ret) + { + hddLog(VOS_TRACE_LEVEL_ERROR, + "%s: HDD context is not valid (%d)", __func__, ret); + return; + } + + if (pHddCtx->cfg_ini->fIsBmpsEnabled) + { + sme_RequestBmps(WLAN_HDD_GET_HAL_CTX(pAdapter), NULL, NULL); + } +} + eHalStatus hdd_smeRoamCallback( void *pContext, tCsrRoamInfo *pRoamInfo, tANI_U32 roamId, eRoamCmdStatus roamStatus, eCsrRoamResult roamResult ) { @@ -2897,11 +2926,9 @@ eHalStatus hdd_smeRoamCallback( void *pContext, tCsrRoamInfo *pRoamInfo, tANI_U3 { hddLog( LOGE, FL("Not expected: device is already in BMPS mode, Exit & Enter BMPS again!")); - /* put the device into full power */ - wlan_hdd_enter_bmps(pAdapter, DRIVER_POWER_MODE_ACTIVE); - - /* put the device back into BMPS */ - wlan_hdd_enter_bmps(pAdapter, DRIVER_POWER_MODE_AUTO); + sme_RequestFullPower(WLAN_HDD_GET_HAL_CTX(pAdapter), + iw_full_power_cbfn, pAdapter, + eSME_FULL_PWR_NEEDED_BY_HDD); } } halStatus = hdd_RoamSetKeyCompleteHandler( pAdapter, pRoamInfo, roamId, roamStatus, roamResult ); |
