qcacld-3.0: Populate API for SAP to help check unsafe channel

Populate policy_mgr_restrict_sap_on_unsafe_chan() to check whether need
check coex unsafe channel when SAP start on fixed channel, only
restriction_mask from user space configure set SAP bit requires to check
unsafe channel when SAP start on fixed channel. If ACS enable, SAP should
check unsafe channel unless above restriction_mask from user space
configure not set SAP bit.

This change is to change back behavior which changed by Change-Id
I4ccf887655066da6d6b50715f631dde6edfda598, and adjust Change-Id
Ie3947058d8854823a718b833ec788c5c8a14b903 after this change.

Change-Id: If8d26fa7cfdd4ffa44dd2009b4d6939f3d4c49b2
CRs-Fixed: 3525515
此提交包含在:
Will Huang
2023-07-17 08:21:41 +05:30
提交者 Rahul Choudhary
父節點 716e6eda86
當前提交 a7b05b29c4
共有 4 個檔案被更改,包括 41 行新增9 行删除

查看文件

@@ -3997,6 +3997,23 @@ QDF_STATUS policy_mgr_get_updated_scan_and_fw_mode_config(
bool policy_mgr_is_safe_channel(struct wlan_objmgr_psoc *psoc,
uint32_t ch_freq);
#ifdef FEATURE_WLAN_CH_AVOID_EXT
/**
* policy_mgr_restrict_sap_on_unsafe_chan() - Check if need check unsafe
* channel if SAP start on fixed channel.
* @psoc: PSOC object information
*
* Return: true for success, else false
*/
bool policy_mgr_restrict_sap_on_unsafe_chan(struct wlan_objmgr_psoc *psoc);
#else
static inline bool
policy_mgr_restrict_sap_on_unsafe_chan(struct wlan_objmgr_psoc *psoc)
{
return false;
}
#endif
/**
* policy_mgr_is_sap_freq_allowed - Check if the channel is allowed for sap
* @psoc: PSOC object information

查看文件

@@ -1580,6 +1580,22 @@ bool policy_mgr_is_safe_channel(struct wlan_objmgr_psoc *psoc,
return is_safe;
}
bool policy_mgr_restrict_sap_on_unsafe_chan(struct wlan_objmgr_psoc *psoc)
{
struct policy_mgr_psoc_priv_obj *pm_ctx;
unsigned long restriction_mask;
pm_ctx = policy_mgr_get_context(psoc);
if (!pm_ctx) {
policy_mgr_err("Invalid context");
return false;
}
restriction_mask =
(unsigned long)policy_mgr_get_freq_restriction_mask(pm_ctx);
return qdf_test_bit(QDF_SAP_MODE, &restriction_mask);
}
#else
bool policy_mgr_is_safe_channel(struct wlan_objmgr_psoc *psoc,
uint32_t ch_freq)
@@ -1730,8 +1746,7 @@ bool policy_mgr_is_sap_restart_required_after_sta_disconnect(
}
if ((is_acs_mode ||
!target_psoc_get_sap_coex_fixed_chan_cap(
wlan_psoc_get_tgt_if_handle(psoc))) &&
policy_mgr_restrict_sap_on_unsafe_chan(psoc)) &&
sta_sap_scc_on_lte_coex_chan &&
!policy_mgr_is_safe_channel(psoc, op_ch_freq_list[i]) &&
pm_ctx->last_disconn_sta_freq == op_ch_freq_list[i]) {