qcacmn: Stop the opportunistic timer when hdd stop happens

Stop the opportunistic timer & take action if needed when hdd stop
happens. Also, take action when set_hw_mode request to FW times out.

Change-Id: I32f1e38e93a5805e0d85b800cc4e070cd6f79669
CRs-Fixed: 2133388
This commit is contained in:
Tushnim Bhattacharyya 2017-10-25 16:33:06 -07:00 • committed by snandini
commit bdda5823be
3 changed files with 31 additions and 0 deletions

View file

@ -2129,6 +2129,19 @@ void policy_mgr_set_cur_conc_system_pref(struct wlan_objmgr_psoc *psoc,
* Return: conc_system_pref
*/
uint8_t policy_mgr_get_cur_conc_system_pref(struct wlan_objmgr_psoc *psoc);
/**
* policy_mgr_check_and_stop_opportunistic_timer - Get current
* state of opportunistic timer, if running, stop it and take
* action
* @psoc: soc pointer
*
* Get the current state of opportunistic timer, if it is
* running, stop it and take action.
*
* Return: None
*/
void policy_mgr_check_and_stop_opportunistic_timer(
struct wlan_objmgr_psoc *psoc);
/**
* policy_mgr_set_weight_of_dfs_passive_channels_to_zero() - set weight of dfs

View file

@ -896,6 +896,7 @@ struct policy_mgr_hw_mode {
void *set_hw_mode_cb;
enum policy_mgr_conn_update_reason reason;
uint32_t session_id;
struct wlan_objmgr_vdev *vdev;
struct wlan_objmgr_psoc *context;
};

View file

@ -1092,6 +1092,23 @@ void policy_mgr_checkn_update_hw_mode_single_mac_mode(
pm_dbs_opportunistic_timer_handler((void *)psoc);
}
void policy_mgr_check_and_stop_opportunistic_timer(
struct wlan_objmgr_psoc *psoc)
{
struct policy_mgr_psoc_priv_obj *pm_ctx;
pm_ctx = policy_mgr_get_context(psoc);
if (!pm_ctx) {
policy_mgr_err("Invalid Context");
return;
}
if (QDF_TIMER_STATE_RUNNING ==
pm_ctx->dbs_opportunistic_timer.state) {
qdf_mc_timer_stop(&pm_ctx->dbs_opportunistic_timer);
pm_dbs_opportunistic_timer_handler((void *)psoc);
}
}
void policy_mgr_set_hw_mode_change_in_progress(
struct wlan_objmgr_psoc *psoc, enum policy_mgr_hw_mode_change value)
{