Browse Source

qcacmn: Add sta_sap_scc_on_indoor_channel var to psoc/pdev

Add the variable sta_sap_scc_on_indoor_channel in
psoc and pdev reg objmgr, to access the INI value of
sta_sap_scc_on_indoor_chan

Change-Id: Ie0c41d75d0f617274743f5196e65dab93414b7eb
CRs-Fixed: 3191788
Surya Prakash Sivaraj 3 năm trước cách đây
mục cha
commit
7f57fa1bd9

+ 3 - 3
umac/regulatory/core/src/reg_build_chan_list.c

@@ -423,12 +423,12 @@ static void reg_modify_chan_list_for_indoor_channels(
 			     chan_list[chan_enum].chan_flags)) {
 				chan_list[chan_enum].state =
 					CHANNEL_STATE_DFS;
-				chan_list[chan_enum].chan_flags |=
-					REGULATORY_CHAN_NO_IR;
+				if (!pdev_priv_obj->sta_sap_scc_on_indoor_channel)
+					chan_list[chan_enum].chan_flags |=
+							REGULATORY_CHAN_NO_IR;
 			}
 		}
 	}
-
 	if (pdev_priv_obj->force_ssc_disable_indoor_channel &&
 	    pdev_priv_obj->sap_state) {
 		for (chan_enum = 0; chan_enum < NUM_CHANNELS; chan_enum++) {

+ 3 - 0
umac/regulatory/core/src/reg_priv_objs.c

@@ -125,6 +125,7 @@ QDF_STATUS wlan_regulatory_psoc_obj_created_notification(
 	reg_set_5dot9_ghz_chan_in_master_mode(soc_reg_obj);
 	soc_reg_obj->retain_nol_across_regdmn_update = false;
 	soc_reg_obj->is_ext_tpc_supported = false;
+	soc_reg_obj->sta_sap_scc_on_indoor_channel = true;
 
 	for (i = 0; i < MAX_STA_VDEV_CNT; i++)
 		soc_reg_obj->vdev_ids_11d[i] = INVALID_VDEV_ID;
@@ -357,6 +358,8 @@ QDF_STATUS wlan_regulatory_pdev_obj_created_notification(
 	reg_cap_ptr = psoc_priv_obj->reg_cap;
 	pdev_priv_obj->force_ssc_disable_indoor_channel =
 		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;
 
 	for (cnt = 0; cnt < PSOC_MAX_PHY_REG_CAP; cnt++) {
 		if (!reg_cap_ptr) {

+ 4 - 0
umac/regulatory/core/src/reg_priv_objs.h

@@ -120,6 +120,7 @@ struct chan_change_cbk_entry {
  * @coex_unsafe_chan_reg_disable: To disable reg channels for received coex
  * unsafe channels list
  * @reg_afc_dev_type: AFC device deployment type from BDF
+ * @sta_sap_scc_on_indoor_channel: Value of sap+sta scc on indoor support
  */
 struct wlan_regulatory_psoc_priv_obj {
 	struct mas_chan_params mas_chan_params[PSOC_MAX_PHY_REG_CAP];
@@ -190,6 +191,7 @@ struct wlan_regulatory_psoc_priv_obj {
 #ifdef CONFIG_AFC_SUPPORT
 	enum reg_afc_dev_deploy_type reg_afc_dev_type;
 #endif
+	bool sta_sap_scc_on_indoor_channel;
 };
 
 /**
@@ -237,6 +239,7 @@ struct wlan_regulatory_psoc_priv_obj {
  * @reg_6g_thresh_priority_freq: All frequencies greater or equal will be given
  * priority during channel selection by upper layer
  * @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
  */
 struct wlan_regulatory_pdev_priv_obj {
 	struct regulatory_channel cur_chan_list[NUM_CHANNELS];
@@ -312,6 +315,7 @@ struct wlan_regulatory_pdev_priv_obj {
 	bool is_reg_noaction_on_afc_pwr_evt;
 	enum reg_afc_dev_deploy_type reg_afc_dev_deployment_type;
 #endif
+	bool sta_sap_scc_on_indoor_channel;
 };
 
 /**

+ 4 - 0
umac/regulatory/core/src/reg_utils.c

@@ -824,6 +824,8 @@ static void reg_change_pdev_for_config(struct wlan_objmgr_psoc *psoc,
 	pdev_priv_obj->force_ssc_disable_indoor_channel =
 		psoc_priv_obj->force_ssc_disable_indoor_channel;
 	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;
 
 	reg_compute_pdev_current_chan_list(pdev_priv_obj);
 
@@ -862,6 +864,8 @@ QDF_STATUS reg_set_config_vars(struct wlan_objmgr_psoc *psoc,
 		config_vars.retain_nol_across_regdmn_update;
 	reg_get_coex_unsafe_chan_nb_user_prefer(psoc_priv_obj, config_vars);
 	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;
 
 	status = wlan_objmgr_psoc_try_get_ref(psoc, WLAN_REGULATORY_SB_ID);
 	if (QDF_IS_STATUS_ERROR(status)) {

+ 2 - 0
umac/regulatory/dispatcher/inc/reg_services_public_struct.h

@@ -1495,6 +1495,7 @@ enum restart_beaconing_on_ch_avoid_rule {
  * userspace
  * @coex_unsafe_chan_reg_disable: To disable reg channels for received coex
  * unsafe channels list
+ * @sta_sap_scc_on_indoor_channel: Value of sap+sta scc on indoor support
  */
 struct reg_config_vars {
 	uint32_t enable_11d_support;
@@ -1513,6 +1514,7 @@ struct reg_config_vars {
 	bool coex_unsafe_chan_nb_user_prefer;
 	bool coex_unsafe_chan_reg_disable;
 #endif
+	bool sta_sap_scc_on_indoor_channel;
 };
 
 /**