/*************************************************************************** * SoftGemini_SetPS * **************************************************************************** * DESCRIPTION: Set Always PS to PowerMgr * * INPUTS: pSoftGemini - the object * ***************************************************************************/ static TI_STATUS SoftGemini_SetPS(SoftGemini_t *pSoftGemini) { paramInfo_t param; bssEntry_t *pBssInfo=NULL; if (pSoftGemini->hCurrBss) { pBssInfo = currBSS_getBssInfo(pSoftGemini->hCurrBss); } else { TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_ERROR, "SoftGemini_SetPS: hCurrBss = NULL!!!\n"); } TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_INFORMATION, "\n"); if (pBssInfo) { TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_INFORMATION, " SG-setPS: band == RADIO_BAND_2_4_GHZ"); /* Set Params to Power Mgr for SG priority */ param.paramType = POWER_MGR_POWER_MODE; param.content.powerMngPowerMode.PowerMode = POWER_MODE_PS_ONLY; param.content.powerMngPowerMode.PowerMngPriority = POWER_MANAGER_SG_PRIORITY; powerMgr_setParam(pSoftGemini->hPowerMgr,¶m); /* enable SG priority for Power Mgr */ param.paramType = POWER_MGR_ENABLE_PRIORITY; param.content.powerMngPriority = POWER_MANAGER_SG_PRIORITY; return powerMgr_setParam(pSoftGemini->hPowerMgr,¶m); } return TI_OK; }
/*************************************************************************** * SoftGemini_SetPS * **************************************************************************** * DESCRIPTION: Set Always PS to PowerMgr * * INPUTS: pSoftGemini - the object * ***************************************************************************/ static TI_STATUS SoftGemini_SetPS(SoftGemini_t *pSoftGemini) { paramInfo_t param; bssEntry_t *pBssInfo=NULL; if (pSoftGemini->hCurrBss) { pBssInfo = currBSS_getBssInfo(pSoftGemini->hCurrBss); } if (pBssInfo) { if ((pBssInfo->band == RADIO_BAND_2_4_GHZ)) { /* Set Params to Power Mgr for SG priority */ param.paramType = POWER_MGR_POWER_MODE; param.content.powerMngPowerMode.PowerMode = POWER_MODE_PS_ONLY; param.content.powerMngPowerMode.PowerMngPriority = POWER_MANAGER_SG_PRIORITY; powerMgr_setParam(pSoftGemini->hPowerMgr,¶m); /* enable SG priority for Power Mgr */ param.paramType = POWER_MGR_ENABLE_PRIORITY; param.content.powerMngPriority = POWER_MANAGER_SG_PRIORITY; return powerMgr_setParam(pSoftGemini->hPowerMgr,¶m); } } return TI_OK; }
/*************************************************************************** * SoftGemini_EnableProtectiveMode * **************************************************************************** * DESCRIPTION: Activated when FW inform us that protective mode is ON * * * INPUTS: pSoftGemini - the object * ***************************************************************************/ void SoftGemini_EnableProtectiveMode(TI_HANDLE hSoftGemini) { SoftGemini_t *pSoftGemini = (SoftGemini_t *)hSoftGemini; paramInfo_t param; pSoftGemini->bProtectiveMode = TI_TRUE; /* set new configurations of SG roaming parameters */ /* This code should be removed on SG stage 2 integration currBSS_SGconfigureBSSLoss(pSoftGemini->hCurrBss,pSoftGemini->BSSLossCompensationPercent,TI_TRUE); */ /* set new configurations of scan to scancncn */ scanCncn_SGconfigureScanParams(pSoftGemini->hScanCncn,TI_TRUE, (TI_UINT8)pSoftGemini->SoftGeminiParam.coexParams[SOFT_GEMINI_AUTO_SCAN_PROBE_REQ], pSoftGemini->SoftGeminiParam.coexParams[SOFT_GEMINI_HV3_MAX_OVERRIDE], pSoftGemini->SoftGeminiParam.coexParams[SOFT_GEMINI_ACTIVE_SCAN_DURATION_FACTOR_HV3]); /* Call the power manager to enter short doze */ TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_INFORMATION, " SoftGemini_EnableProtectiveMode set SD"); /* Set Params to Power Mgr for SG priority */ param.paramType = POWER_MGR_POWER_MODE; param.content.powerMngPowerMode.PowerMode = POWER_MODE_SHORT_DOZE; param.content.powerMngPowerMode.PowerMngPriority = POWER_MANAGER_SG_PRIORITY; powerMgr_setParam(pSoftGemini->hPowerMgr,¶m); }
/*************************************************************************** * SoftGemini_unSetPS * **************************************************************************** * DESCRIPTION: unSet Always PS to PowerMgr * * INPUTS: pSoftGemini - the object * ***************************************************************************/ static TI_STATUS SoftGemini_unSetPS(SoftGemini_t *pSoftGemini) { paramInfo_t param; /* disable SG priority for Power Mgr*/ param.paramType = POWER_MGR_DISABLE_PRIORITY; param.content.powerMngPriority = POWER_MANAGER_SG_PRIORITY; return powerMgr_setParam(pSoftGemini->hPowerMgr,¶m); }
/*************************************************************************** * SoftGemini_unSetPS * **************************************************************************** * DESCRIPTION: unSet Always PS to PowerMgr * * INPUTS: pSoftGemini - the object * ***************************************************************************/ static TI_STATUS SoftGemini_unSetPS(SoftGemini_t *pSoftGemini) { paramInfo_t param; TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_INFORMATION, ", SG-unSetPS \n"); /* disable SG priority for Power Mgr*/ param.paramType = POWER_MGR_DISABLE_PRIORITY; param.content.powerMngPriority = POWER_MANAGER_SG_PRIORITY; return powerMgr_setParam(pSoftGemini->hPowerMgr,¶m); }
void SoftGemini_RemoveProtectiveModeParameters(TI_HANDLE hSoftGemini) { SoftGemini_t *pSoftGemini = (SoftGemini_t *)hSoftGemini; paramInfo_t param; /* don't use the SG roaming parameters */ currBSS_SGconfigureBSSLoss(pSoftGemini->hCurrBss,0,TI_FALSE); /* don't use the SG scan parameters */ scanCncn_SGconfigureScanParams(pSoftGemini->hScanCncn,TI_FALSE,0,0,0); /* Call the power manager to exit short doze */ /* Set Params to Power Mgr for SG priority */ param.paramType = POWER_MGR_POWER_MODE; param.content.powerMngPowerMode.PowerMode = POWER_MODE_PS_ONLY; param.content.powerMngPowerMode.PowerMngPriority = POWER_MANAGER_SG_PRIORITY; powerMgr_setParam(pSoftGemini->hPowerMgr,¶m); }