1
0

qcacld-3.0: Cleanup P2P GO support on indoor channel

Rename policy_mgr_is_sap_allowed_on_indoor() to
policy_mgr_is_sap_go_interface_allowed_on_indoor() since
it is common between SAP and GO. Cleanup the API as well.

Change-Id: I8380bd81c5050e9f12c00fff830455f14135c2b4
CRs-Fixed: 3423703
Este cometimento está contido em:
Surya Prakash Sivaraj
2023-03-24 20:53:22 +05:30
cometido por Madan Koyyalamudi
ascendente fbe284ddd4
cometimento 34ec96337f
7 ficheiros modificados com 62 adições e 41 eliminações

Ver ficheiro

@@ -5010,8 +5010,8 @@ policy_mgr_is_conc_sap_present_on_sta_freq(struct wlan_objmgr_psoc *psoc,
uint32_t policy_mgr_get_connection_count_with_ch_freq(uint32_t ch_freq);
/**
* policy_mgr_is_sap_allowed_on_indoor() - Check if the SAP operation
* is allowed in the indoor channel
* policy_mgr_is_sap_go_interface_allowed_on_indoor() - Check if SAP or GO
* interface is allowed on the indoor channel
*
* @pdev: pointer to pdev
* @vdev_id: vdev id
@@ -5019,8 +5019,10 @@ uint32_t policy_mgr_get_connection_count_with_ch_freq(uint32_t ch_freq);
*
* Return: is SAP allowed
*/
bool policy_mgr_is_sap_allowed_on_indoor(struct wlan_objmgr_pdev *pdev,
uint8_t vdev_id, qdf_freq_t ch_freq);
bool
policy_mgr_is_sap_go_interface_allowed_on_indoor(struct wlan_objmgr_pdev *pdev,
uint8_t vdev_id,
qdf_freq_t ch_freq);
#ifdef WLAN_FEATURE_TDLS_CONCURRENCIES
/**

Ver ficheiro

@@ -1723,9 +1723,10 @@ bool policy_mgr_is_sap_restart_required_after_sta_disconnect(
* channel.
*/
if (pm_ctx->last_disconn_sta_freq == op_ch_freq_list[i] &&
!policy_mgr_is_sap_allowed_on_indoor(pm_ctx->pdev,
sap_vdev_id,
op_ch_freq_list[i])) {
!policy_mgr_is_sap_go_interface_allowed_on_indoor(
pm_ctx->pdev,
sap_vdev_id,
op_ch_freq_list[i])) {
curr_sap_freq = op_ch_freq_list[i];
policy_mgr_debug("indoor sap_ch_freq %u",
curr_sap_freq);
@@ -1781,9 +1782,10 @@ bool policy_mgr_is_sap_restart_required_after_sta_disconnect(
* on indoor which is not removed in policy_mgr_get_pcl
*/
if (!sta_gc_present &&
!policy_mgr_is_sap_allowed_on_indoor(pm_ctx->pdev,
sap_vdev_id,
pcl_channels[i])) {
!policy_mgr_is_sap_go_interface_allowed_on_indoor(
pm_ctx->pdev,
sap_vdev_id,
pcl_channels[i])) {
policy_mgr_debug("Do not allow SAP on indoor frequency, STA is absent");
continue;
}
@@ -2628,9 +2630,9 @@ policy_mgr_valid_sap_conc_channel_check(struct wlan_objmgr_psoc *psoc,
find_alternate = true;
policymgr_nofl_debug("sap not capable on SRD con ch_freq %d",
ch_freq);
} else if (!policy_mgr_is_sap_allowed_on_indoor(pm_ctx->pdev,
sap_vdev_id,
ch_freq)) {
} else if (!policy_mgr_is_sap_go_interface_allowed_on_indoor(
pm_ctx->pdev,
sap_vdev_id, ch_freq)) {
policymgr_nofl_debug("sap not capable on indoor con ch_freq %d is_sta_sap_scc:%d",
ch_freq, is_sta_sap_scc);
find_alternate = true;

Ver ficheiro

@@ -9085,8 +9085,10 @@ bool policy_mgr_is_sap_allowed_on_dfs_freq(struct wlan_objmgr_pdev *pdev,
return true;
}
bool policy_mgr_is_sap_allowed_on_indoor(struct wlan_objmgr_pdev *pdev,
uint8_t vdev_id, qdf_freq_t ch_freq)
bool
policy_mgr_is_sap_go_interface_allowed_on_indoor(struct wlan_objmgr_pdev *pdev,
uint8_t vdev_id,
qdf_freq_t ch_freq)
{
struct wlan_objmgr_psoc *psoc;
bool is_scc = false, indoor_support = false;
@@ -9110,7 +9112,7 @@ bool policy_mgr_is_sap_allowed_on_indoor(struct wlan_objmgr_pdev *pdev,
* a) Restrict 6 GHz SAP
* b) Restrict standalone 5 GHz SAP
*
* If p2p_go_on_indoor_chan is enabled - Allow GO
* If p2p_go_on_5ghz_indoor_chan is enabled - Allow GO
* with or without concurrency
*
* If sta_sap_scc_on_indoor_chan is enabled - Allow
@@ -9118,18 +9120,30 @@ bool policy_mgr_is_sap_allowed_on_indoor(struct wlan_objmgr_pdev *pdev,
*
* Restrict all other operations on indoor
*/
if (indoor_support) {
if (indoor_support)
return true;
} else if (WLAN_REG_IS_6GHZ_CHAN_FREQ(ch_freq) ||
(!is_scc && mode == QDF_SAP_MODE)) {
if (WLAN_REG_IS_6GHZ_CHAN_FREQ(ch_freq)) {
policy_mgr_rl_debug("SAP operation is not allowed on 6 GHz indoor channel");
return false;
}
if (mode == QDF_SAP_MODE) {
if (is_scc &&
policy_mgr_get_sta_sap_scc_allowed_on_indoor_chnl(psoc))
return true;
policy_mgr_rl_debug("SAP operation is not allowed on indoor channel");
return false;
} else if (mode == QDF_P2P_GO_MODE &&
ucfg_p2p_get_indoor_ch_support(psoc)) {
return true;
} else if (is_scc &&
policy_mgr_get_sta_sap_scc_allowed_on_indoor_chnl(psoc)) {
return true;
}
if (mode == QDF_P2P_GO_MODE) {
if (ucfg_p2p_get_indoor_ch_support(psoc) ||
(is_scc &&
policy_mgr_get_sta_sap_scc_allowed_on_indoor_chnl(psoc)))
return true;
policy_mgr_rl_debug("GO operation is not allowed on indoor channel");
return false;
}
policy_mgr_rl_debug("SAP operation is not allowed on indoor channel");
@@ -9898,9 +9912,9 @@ bool policy_mgr_is_restart_sap_required(struct wlan_objmgr_psoc *psoc,
if (connection[i].freq != freq &&
WLAN_REG_IS_24GHZ_CH_FREQ(connection[i].freq) &&
WLAN_REG_IS_5GHZ_CH_FREQ(freq) &&
!policy_mgr_is_sap_allowed_on_indoor(pm_ctx->pdev,
vdev_id,
freq)) {
!policy_mgr_is_sap_go_interface_allowed_on_indoor(
pm_ctx->pdev,
vdev_id, freq)) {
policy_mgr_debug("SAP in indoor freq: sta:%d sap:%d",
connection[i].freq, freq);
restart_required = true;