mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 22:23:14 -04:00
qcacld-3.0: Add API policy_mgr_get_can_skip_radar_event
Dfs radar processing function dfs_process_radar_ind is called in interrupt context. Add new API policy_mgr_get_can_skip_radar_event to be called in interrupt context to get radar skip flag. The policy_mgr_get_dfs_master_dynamic_enabled will acquire mutex and can't be called in interrupt context. Change-Id: I1a3ce8536465d6f6da86b0cf7312e6430ea8ec89 CRs-Fixed: 2672701
This commit is contained in:
parent
a38e433ac2
commit
8ed3d20d75
3 changed files with 72 additions and 11 deletions
|
|
@ -216,6 +216,20 @@ bool
|
|||
policy_mgr_get_dfs_master_dynamic_enabled(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* policy_mgr_get_can_skip_radar_event - Can skip DFS Radar event or not
|
||||
* @psoc: soc obj
|
||||
* @vdev_id: sap vdev id
|
||||
*
|
||||
* This API is used by dfs component to get decision whether to ignore
|
||||
* the radar event or not.
|
||||
*
|
||||
* Return: true if Radar event should be ignored.
|
||||
*/
|
||||
bool
|
||||
policy_mgr_get_can_skip_radar_event(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* policy_mgr_get_sta_sap_scc_lte_coex_chnl() - to find out if STA & SAP
|
||||
* SCC is allowed on LTE COEX
|
||||
|
|
|
|||
|
|
@ -133,15 +133,15 @@ policy_mgr_get_sta_sap_scc_on_dfs_chnl(struct wlan_objmgr_psoc *psoc,
|
|||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
bool
|
||||
policy_mgr_get_dfs_master_dynamic_enabled(
|
||||
static bool
|
||||
policy_mgr_update_dfs_master_dynamic_enabled(
|
||||
struct wlan_objmgr_psoc *psoc, uint8_t vdev_id)
|
||||
{
|
||||
struct policy_mgr_psoc_priv_obj *pm_ctx;
|
||||
bool sta_on_5g = false;
|
||||
bool sta_on_2g = false;
|
||||
uint32_t i;
|
||||
bool enable;
|
||||
bool enable = true;
|
||||
|
||||
pm_ctx = policy_mgr_get_context(psoc);
|
||||
if (!pm_ctx) {
|
||||
|
|
@ -149,16 +149,21 @@ policy_mgr_get_dfs_master_dynamic_enabled(
|
|||
return true;
|
||||
}
|
||||
|
||||
if (!pm_ctx->cfg.sta_sap_scc_on_dfs_chnl)
|
||||
return true;
|
||||
if (!pm_ctx->cfg.sta_sap_scc_on_dfs_chnl) {
|
||||
enable = true;
|
||||
goto end;
|
||||
}
|
||||
if (pm_ctx->cfg.sta_sap_scc_on_dfs_chnl ==
|
||||
PM_STA_SAP_ON_DFS_MASTER_MODE_DISABLED)
|
||||
return false;
|
||||
PM_STA_SAP_ON_DFS_MASTER_MODE_DISABLED) {
|
||||
enable = false;
|
||||
goto end;
|
||||
}
|
||||
if (pm_ctx->cfg.sta_sap_scc_on_dfs_chnl !=
|
||||
PM_STA_SAP_ON_DFS_MASTER_MODE_FLEX) {
|
||||
policy_mgr_debug("sta_sap_scc_on_dfs_chnl %d unknown",
|
||||
pm_ctx->cfg.sta_sap_scc_on_dfs_chnl);
|
||||
return true;
|
||||
enable = true;
|
||||
goto end;
|
||||
}
|
||||
|
||||
qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
|
||||
|
|
@ -181,13 +186,46 @@ policy_mgr_get_dfs_master_dynamic_enabled(
|
|||
enable = true;
|
||||
else
|
||||
enable = false;
|
||||
policy_mgr_debug("sta_sap_scc_on_dfs_chnl %d sta_on_2g %d sta_on_5g %d enable %d",
|
||||
pm_ctx->cfg.sta_sap_scc_on_dfs_chnl, sta_on_2g,
|
||||
sta_on_5g, enable);
|
||||
end:
|
||||
pm_ctx->dynamic_dfs_master_disabled = !enable;
|
||||
if (!enable)
|
||||
policy_mgr_debug("sta_sap_scc_on_dfs_chnl %d sta_on_2g %d sta_on_5g %d enable %d",
|
||||
pm_ctx->cfg.sta_sap_scc_on_dfs_chnl, sta_on_2g,
|
||||
sta_on_5g, enable);
|
||||
|
||||
return enable;
|
||||
}
|
||||
|
||||
bool
|
||||
policy_mgr_get_dfs_master_dynamic_enabled(
|
||||
struct wlan_objmgr_psoc *psoc, uint8_t vdev_id)
|
||||
{
|
||||
struct policy_mgr_psoc_priv_obj *pm_ctx;
|
||||
|
||||
pm_ctx = policy_mgr_get_context(psoc);
|
||||
if (!pm_ctx) {
|
||||
policy_mgr_err("pm_ctx is NULL");
|
||||
return true;
|
||||
}
|
||||
|
||||
return policy_mgr_update_dfs_master_dynamic_enabled(psoc, vdev_id);
|
||||
}
|
||||
|
||||
bool
|
||||
policy_mgr_get_can_skip_radar_event(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id)
|
||||
{
|
||||
struct policy_mgr_psoc_priv_obj *pm_ctx;
|
||||
|
||||
pm_ctx = policy_mgr_get_context(psoc);
|
||||
if (!pm_ctx) {
|
||||
policy_mgr_err("pm_ctx is NULL");
|
||||
return false;
|
||||
}
|
||||
|
||||
return pm_ctx->dynamic_dfs_master_disabled;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
policy_mgr_get_sta_sap_scc_lte_coex_chnl(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *sta_sap_scc_lte_coex)
|
||||
|
|
@ -1741,6 +1779,9 @@ void policy_mgr_incr_active_session(struct wlan_objmgr_psoc *psoc,
|
|||
if (mode == QDF_SAP_MODE)
|
||||
policy_mgr_init_ap_6ghz_capable(psoc, session_id,
|
||||
conn_6ghz_flag);
|
||||
if (mode == QDF_SAP_MODE || mode == QDF_P2P_GO_MODE ||
|
||||
mode == QDF_STA_MODE || mode == QDF_P2P_CLIENT_MODE)
|
||||
policy_mgr_update_dfs_master_dynamic_enabled(psoc, session_id);
|
||||
|
||||
policy_mgr_dump_current_concurrency(psoc);
|
||||
|
||||
|
|
@ -1860,6 +1901,10 @@ QDF_STATUS policy_mgr_decr_active_session(struct wlan_objmgr_psoc *psoc,
|
|||
if (mode == QDF_STA_MODE || mode == QDF_P2P_CLIENT_MODE)
|
||||
pm_ctx->do_sap_unsafe_ch_check = true;
|
||||
|
||||
if (mode == QDF_SAP_MODE || mode == QDF_P2P_GO_MODE ||
|
||||
mode == QDF_STA_MODE || mode == QDF_P2P_CLIENT_MODE)
|
||||
policy_mgr_update_dfs_master_dynamic_enabled(psoc, session_id);
|
||||
|
||||
return qdf_status;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -335,6 +335,7 @@ struct policy_mgr_cfg {
|
|||
* @user_config_sap_ch_freq: SAP channel freq configured by user application
|
||||
* @cfg: Policy manager config data
|
||||
* @dynamic_mcc_adaptive_sched: disable/enable mcc adaptive scheduler feature
|
||||
* @dynamic_dfs_master_disabled: current state of dynamic dfs master
|
||||
* @dual_mac_configuration_complete_evt: qdf event to synchronize dual mac
|
||||
* configuration setting
|
||||
*/
|
||||
|
|
@ -378,6 +379,7 @@ struct policy_mgr_psoc_priv_obj {
|
|||
uint32_t valid_ch_freq_list[NUM_CHANNELS];
|
||||
uint32_t valid_ch_freq_list_count;
|
||||
bool dynamic_mcc_adaptive_sched;
|
||||
bool dynamic_dfs_master_disabled;
|
||||
qdf_event_t dual_mac_configuration_complete_evt;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue