qcacmn: Add API to stop DBS opportunistic timer

Add API to stop DBS opportunistic timer in policy mgr.

Change-Id: I11a2b2976c59d7cd09695f90c2d2bdd7338dde54
CRs-Fixed: 2236333
This commit is contained in:
Himanshu Agarwal 2018-05-04 14:37:48 +05:30 • committed by nshrivas
commit 3bd09d612d
2 changed files with 26 additions and 0 deletions

View file

@ -1134,6 +1134,14 @@ QDF_STATUS policy_mgr_set_connection_update(struct wlan_objmgr_psoc *psoc);
*/
QDF_STATUS policy_mgr_set_opportunistic_update(struct wlan_objmgr_psoc *psoc);
/**
* policy_mgr_stop_opportunistic_timer() - Stops opportunistic timer
* @psoc: PSOC object information
*
* Return: QDF_STATUS
*/
QDF_STATUS policy_mgr_stop_opportunistic_timer(struct wlan_objmgr_psoc *psoc);
/**
* policy_mgr_restart_opportunistic_timer() - Restarts opportunistic timer
* @psoc: PSOC object information

View file

@ -1117,6 +1117,24 @@ QDF_STATUS policy_mgr_set_opportunistic_update(struct wlan_objmgr_psoc *psoc)
return QDF_STATUS_SUCCESS;
}
QDF_STATUS policy_mgr_stop_opportunistic_timer(struct wlan_objmgr_psoc *psoc)
{
struct policy_mgr_psoc_priv_obj *policy_mgr_ctx;
policy_mgr_ctx = policy_mgr_get_context(psoc);
if (!policy_mgr_ctx) {
policy_mgr_err("Invalid context");
return QDF_STATUS_E_FAILURE;
}
if (policy_mgr_ctx->dbs_opportunistic_timer.state !=
QDF_TIMER_STATE_RUNNING)
return QDF_STATUS_SUCCESS;
qdf_mc_timer_stop(&policy_mgr_ctx->dbs_opportunistic_timer);
return QDF_STATUS_SUCCESS;
}
QDF_STATUS policy_mgr_restart_opportunistic_timer(
struct wlan_objmgr_psoc *psoc, bool check_state)
{