|
@@ -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;
|
|
|
}
|
|
|
|