diff options
| author | Ganesh Babu Kumaravel <kganesh@qti.qualcomm.com> | 2014-01-07 00:51:18 +0530 |
|---|---|---|
| committer | Prakash Dhavali <pdhavali@codeaurora.org> | 2014-01-18 02:43:09 -0800 |
| commit | 53b82f4943356e1d241ca946fc4d9bc8d9bcd0af (patch) | |
| tree | 38f97442d4eaf3e92439243ea3204823e8201729 | |
| parent | cb348c9f9c8422662491ceaa3cd8ff942f1389ab (diff) | |
qcacld:Configure Trigger Parameters for Dynamic UAPSD
In case of powersave Offload case uapsd trigger parameters are
configured in case of enabling dynamic uapsd on successful
tspec negotiation.
Change-Id: I00a5d6a0a7a870b4068a09e98cc00d8dba8b947f
CRs-Fixed: 594753
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_wmm.c | 8 | ||||
| -rw-r--r-- | CORE/SME/inc/pmcApi.h | 3 | ||||
| -rw-r--r-- | CORE/SME/inc/sme_Api.h | 4 | ||||
| -rw-r--r-- | CORE/SME/src/pmc/pmcApi.c | 45 | ||||
| -rw-r--r-- | CORE/SME/src/sme_common/sme_Api.c | 10 |
5 files changed, 65 insertions, 5 deletions
diff --git a/CORE/HDD/src/wlan_hdd_wmm.c b/CORE/HDD/src/wlan_hdd_wmm.c index c809e8686ec4..ff0bede2fbae 100644 --- a/CORE/HDD/src/wlan_hdd_wmm.c +++ b/CORE/HDD/src/wlan_hdd_wmm.c @@ -181,7 +181,9 @@ static void hdd_wmm_enable_tl_uapsd (hdd_wmm_qos_context_t* pQosContext) } // are we in the appropriate power save modes? - if (!sme_IsPowerSaveEnabled(WLAN_HDD_GET_HAL_CTX(pAdapter), ePMC_BEACON_MODE_POWER_SAVE)) + if (!sme_IsPowerSaveEnabled(WLAN_HDD_GET_HAL_CTX(pAdapter), + pAdapter->sessionId, + ePMC_BEACON_MODE_POWER_SAVE)) { VOS_TRACE(VOS_MODULE_ID_HDD, WMM_TRACE_LEVEL_INFO, "%s: BMPS is not enabled", @@ -189,7 +191,9 @@ static void hdd_wmm_enable_tl_uapsd (hdd_wmm_qos_context_t* pQosContext) return; } - if (!sme_IsPowerSaveEnabled(WLAN_HDD_GET_HAL_CTX(pAdapter), ePMC_UAPSD_MODE_POWER_SAVE)) + if (!sme_IsPowerSaveEnabled(WLAN_HDD_GET_HAL_CTX(pAdapter), + pAdapter->sessionId, + ePMC_UAPSD_MODE_POWER_SAVE)) { VOS_TRACE(VOS_MODULE_ID_HDD, WMM_TRACE_LEVEL_INFO, "%s: U-APSD is not enabled", diff --git a/CORE/SME/inc/pmcApi.h b/CORE/SME/inc/pmcApi.h index 79db57192625..0a7be56c2561 100644 --- a/CORE/SME/inc/pmcApi.h +++ b/CORE/SME/inc/pmcApi.h @@ -627,5 +627,8 @@ eHalStatus pmcOffloadSetTdlsProhibitBmpsStatus(tHalHandle hHal, tANI_U32 sessionId, v_BOOL_t val); #endif + +tANI_BOOLEAN pmcOffloadIsPowerSaveEnabled (tHalHandle hHal, tANI_U32 sessionId, + tPmcPowerSavingMode psMode); #endif diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h index edfa8d868ccc..a4b24cbcade9 100644 --- a/CORE/SME/inc/sme_Api.h +++ b/CORE/SME/inc/sme_Api.h @@ -1100,11 +1100,13 @@ extern eHalStatus sme_QueryPowerState ( \brief Checks if the device is able to enter a particular power save mode This does not imply that the device is in a particular PS mode \param hHal - The handle returned by macOpen. + \param sessionId - sme sessionid \param psMode - the power saving mode \return eHalStatus ---------------------------------------------------------------------------*/ -extern tANI_BOOLEAN sme_IsPowerSaveEnabled( +extern tANI_BOOLEAN sme_IsPowerSaveEnabled ( tHalHandle hHal, + tANI_U32 sessionId, tPmcPowerSavingMode psMode); /* --------------------------------------------------------------------------- diff --git a/CORE/SME/src/pmc/pmcApi.c b/CORE/SME/src/pmc/pmcApi.c index 5d9691e849e8..eb7bc507ac00 100644 --- a/CORE/SME/src/pmc/pmcApi.c +++ b/CORE/SME/src/pmc/pmcApi.c @@ -4260,3 +4260,48 @@ eHalStatus pmcOffloadSetTdlsProhibitBmpsStatus(tHalHandle hHal, return eHAL_STATUS_SUCCESS; } #endif + +/****************************************************************************** +* +* Name: pmcOffloadIsPowerSaveEnabled +* +* Description: +* Checks if the device is able to enter one of the power save modes. +* "Able to enter" means the power save mode is enabled for the device +* and the host is using the correct power source for entry into the +* power save mode. This routine does not indicate whether the device +* is actually in the power save mode at a particular point in time. +* +* Parameters: +* hHal - HAL handle for device +* psMode - the power saving mode +* +* Returns: +* TRUE if device is able to enter the power save mode, FALSE otherwise +* +******************************************************************************/ +tANI_BOOLEAN pmcOffloadIsPowerSaveEnabled (tHalHandle hHal, tANI_U32 sessionId, + tPmcPowerSavingMode psMode) +{ + tpAniSirGlobal pMac = PMAC_STRUCT(hHal); + tpPsOffloadPerSessionInfo pmc = &pMac->pmcOffloadInfo.pmc[sessionId]; + + pmcLog(pMac, LOG2, FL("Entering pmcIsPowerSaveEnabled, power save mode %d"), + psMode); + + /* Check ability to enter based on the specified power saving mode. */ + switch (psMode) + { + case ePMC_BEACON_MODE_POWER_SAVE: + return pMac->pmcOffloadInfo.staPsEnabled; + + case ePMC_UAPSD_MODE_POWER_SAVE: + return pmc->UapsdEnabled; + + default: + pmcLog(pMac, LOGE, FL("Invalid power save mode %d"), psMode); + PMC_ABORT; + return FALSE; + } +} + diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c index 969aa09c6b25..cf12bd650d51 100644 --- a/CORE/SME/src/sme_common/sme_Api.c +++ b/CORE/SME/src/sme_common/sme_Api.c @@ -4180,10 +4180,13 @@ eHalStatus sme_QueryPowerState ( \brief Checks if the device is able to enter a particular power save mode This does not imply that the device is in a particular PS mode \param hHal - The handle returned by macOpen. + \param sessionId - sme session id \param psMode - the power saving mode \return eHalStatus ---------------------------------------------------------------------------*/ -tANI_BOOLEAN sme_IsPowerSaveEnabled (tHalHandle hHal, tPmcPowerSavingMode psMode) +tANI_BOOLEAN sme_IsPowerSaveEnabled (tHalHandle hHal, + tANI_U32 sessionId, + tPmcPowerSavingMode psMode) { eHalStatus status = eHAL_STATUS_FAILURE; tpAniSirGlobal pMac = PMAC_STRUCT( hHal ); @@ -4194,7 +4197,10 @@ tANI_BOOLEAN sme_IsPowerSaveEnabled (tHalHandle hHal, tPmcPowerSavingMode psMode status = sme_AcquireGlobalLock( &pMac->sme ); if ( HAL_STATUS_SUCCESS( status ) ) { - result = pmcIsPowerSaveEnabled(hHal, psMode); + if(!pMac->psOffloadEnabled) + result = pmcIsPowerSaveEnabled(hHal, psMode); + else + result = pmcOffloadIsPowerSaveEnabled(hHal, sessionId, psMode); sme_ReleaseGlobalLock( &pMac->sme ); return result; } |
