qcacmn: Enable P2P GO operation on indoor channels

Do not mark REGULATORY_CHAN_NO_IR channel flag for
the 5 GHz indoor channels if p2p go support is enabled
on indoor channels.

Change-Id: I7fbae71766260513aa9946446b7e8bf8507df53b
CRs-Fixed: 3411708
This commit is contained in:
Surya Prakash Sivaraj
2023-02-20 22:03:12 +05:30
committed by Madan Koyyalamudi
parent f2fbe214d4
commit 315a1b3f8b
5 changed files with 23 additions and 4 deletions

View File

@@ -574,7 +574,9 @@ static void reg_modify_chan_list_for_indoor_channels(
if (!(REGULATORY_CHAN_DISABLED &
chan_list[chan_enum].chan_flags) &&
(REGULATORY_CHAN_INDOOR_ONLY &
chan_list[chan_enum].chan_flags)) {
chan_list[chan_enum].chan_flags) &&
!(pdev_priv_obj->p2p_indoor_ch_support &&
reg_is_5ghz_ch_freq(chan_list[chan_enum].center_freq))) {
chan_list[chan_enum].state =
CHANNEL_STATE_DFS;
chan_list[chan_enum].chan_flags |=
@@ -599,10 +601,12 @@ static void reg_modify_chan_list_for_indoor_channels(
}
/**
*reg_modify_chan_list_for_indoor_concurrency() - Enable/Disable the indoor
*channels for SAP operation based on the indoor concurrency list
* reg_modify_chan_list_for_indoor_concurrency() - Enable/Disable the indoor
* channels for SAP operation based on the indoor concurrency list
*
* @pdev_priv_obj: Pointer to regulatory private pdev structure.
*
* Return: None
*/
static void reg_modify_chan_list_for_indoor_concurrency(
struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj)
@@ -613,6 +617,7 @@ static void reg_modify_chan_list_for_indoor_concurrency(
uint8_t i;
if (pdev_priv_obj->indoor_chan_enabled ||
pdev_priv_obj->p2p_indoor_ch_support ||
!pdev_priv_obj->sta_sap_scc_on_indoor_channel)
return;

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -127,6 +127,7 @@ QDF_STATUS wlan_regulatory_psoc_obj_created_notification(
soc_reg_obj->is_ext_tpc_supported = false;
soc_reg_obj->sta_sap_scc_on_indoor_channel = true;
soc_reg_obj->set_fcc_channel = false;
soc_reg_obj->p2p_indoor_ch_support = false;
for (i = 0; i < MAX_STA_VDEV_CNT; i++)
soc_reg_obj->vdev_ids_11d[i] = INVALID_VDEV_ID;
@@ -361,6 +362,8 @@ QDF_STATUS wlan_regulatory_pdev_obj_created_notification(
psoc_priv_obj->force_ssc_disable_indoor_channel;
pdev_priv_obj->sta_sap_scc_on_indoor_channel =
psoc_priv_obj->sta_sap_scc_on_indoor_channel;
pdev_priv_obj->p2p_indoor_ch_support =
psoc_priv_obj->p2p_indoor_ch_support;
for (cnt = 0; cnt < PSOC_MAX_PHY_REG_CAP; cnt++) {
if (!reg_cap_ptr) {

View File

@@ -195,6 +195,7 @@ struct indoor_concurrency_list {
* @afc_disable_request_id_check: Whether disable target AFC request id check
* @is_afc_reg_noaction: Whether no action to AFC power event
* @sta_sap_scc_on_indoor_channel: Value of sap+sta scc on indoor support
* @p2p_indoor_ch_support: Allow P2P GO in indoor channels
* @fcc_rules_ptr: Value of fcc channel frequency and tx_power list received
* from firmware
* @set_fcc_channel: Flag to set fcc channels
@@ -275,6 +276,7 @@ struct wlan_regulatory_psoc_priv_obj {
bool is_afc_reg_noaction;
#endif
bool sta_sap_scc_on_indoor_channel;
bool p2p_indoor_ch_support;
#ifdef CONFIG_REG_CLIENT
struct cur_fcc_rule fcc_rules_ptr[MAX_NUM_FCC_RULES];
#endif
@@ -356,6 +358,7 @@ struct wlan_regulatory_psoc_priv_obj {
* take action when AFC Power event is received
* @reg_afc_dev_deployment_type: AFC device deployment type from BDF
* @sta_sap_scc_on_indoor_channel: Value of sap+sta scc on indoor support
* @p2p_indoor_ch_support: Allow P2P GO in indoor channels
* @fcc_rules_ptr : Value of fcc channel frequency and tx_power list received
* from firmware
* @indoor_list: List of current indoor station interfaces
@@ -436,6 +439,7 @@ struct wlan_regulatory_pdev_priv_obj {
enum reg_afc_dev_deploy_type reg_afc_dev_deployment_type;
#endif
bool sta_sap_scc_on_indoor_channel;
bool p2p_indoor_ch_support;
#ifdef CONFIG_REG_CLIENT
struct cur_fcc_rule fcc_rules_ptr[MAX_NUM_FCC_RULES];
struct indoor_concurrency_list indoor_list[MAX_INDOOR_LIST_SIZE];

View File

@@ -889,6 +889,8 @@ static void reg_change_pdev_for_config(struct wlan_objmgr_psoc *psoc,
pdev_priv_obj->band_capability = psoc_priv_obj->band_capability;
pdev_priv_obj->sta_sap_scc_on_indoor_channel =
psoc_priv_obj->sta_sap_scc_on_indoor_channel;
pdev_priv_obj->p2p_indoor_ch_support =
psoc_priv_obj->p2p_indoor_ch_support;
reg_compute_pdev_current_chan_list(pdev_priv_obj);
@@ -951,6 +953,9 @@ QDF_STATUS reg_set_config_vars(struct wlan_objmgr_psoc *psoc,
reg_get_coex_unsafe_chan_reg_disable(psoc_priv_obj, config_vars);
psoc_priv_obj->sta_sap_scc_on_indoor_channel =
config_vars.sta_sap_scc_on_indoor_channel;
psoc_priv_obj->p2p_indoor_ch_support =
config_vars.p2p_indoor_ch_support;
reg_set_afc_vars(psoc_priv_obj, &config_vars);
status = wlan_objmgr_psoc_try_get_ref(psoc, WLAN_REGULATORY_SB_ID);

View File

@@ -1575,6 +1575,7 @@ enum restart_beaconing_on_ch_avoid_rule {
* @afc_disable_request_id_check: Disable target AFC request id check
* @is_afc_reg_noaction: Whether no action to AFC power event
* @sta_sap_scc_on_indoor_channel: Value of sap+sta scc on indoor support
* @p2p_indoor_ch_support: Allow P2P GO in indoor channels
*/
struct reg_config_vars {
uint32_t enable_11d_support;
@@ -1600,6 +1601,7 @@ struct reg_config_vars {
bool is_afc_reg_noaction;
#endif
bool sta_sap_scc_on_indoor_channel;
bool p2p_indoor_ch_support;
};
/**