Selaa lähdekoodia

qcacmn: Save fcc constraint flag in psoc_priv_obj

Currently only pdev_priv_obj has fcc constraint flag and
it's value gets modified according to the SET_FCC_CHANNEL
command. As a result after getting SET_FCC_CHANNEL command
if wifi turned off and turned on or during SSR sequence
its value is reset to false as pdev is deleted and recreated,
hence the tx_power values of fcc frequencies aren't decreased.

To address this issue, store the fcc constraint flag in
psoc_priv_obj and copy its value to fcc constraint
flag in pdev_priv_obj during pdev creation.

Change-Id: Ic2f5450fd763abf04ad89fe4e5148d03f3b5d69a
CRs-Fixed: 3292446
Asutosh Mohapatra 2 vuotta sitten
vanhempi
sitoutus
238555b44c

+ 2 - 1
umac/regulatory/core/src/reg_priv_objs.c

@@ -126,6 +126,7 @@ QDF_STATUS wlan_regulatory_psoc_obj_created_notification(
 	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;
+	soc_reg_obj->set_fcc_channel = false;
 
 	for (i = 0; i < MAX_STA_VDEV_CNT; i++)
 		soc_reg_obj->vdev_ids_11d[i] = INVALID_VDEV_ID;
@@ -342,7 +343,7 @@ QDF_STATUS wlan_regulatory_pdev_obj_created_notification(
 
 	pdev_priv_obj->pdev_ptr = pdev;
 	pdev_priv_obj->dfs_enabled = psoc_priv_obj->dfs_enabled;
-	pdev_priv_obj->set_fcc_channel = false;
+	pdev_priv_obj->set_fcc_channel = psoc_priv_obj->set_fcc_channel;
 	pdev_priv_obj->band_capability = psoc_priv_obj->band_capability;
 	pdev_priv_obj->indoor_chan_enabled =
 		psoc_priv_obj->indoor_chan_enabled;

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

@@ -123,6 +123,7 @@ struct chan_change_cbk_entry {
  * @sta_sap_scc_on_indoor_channel: Value of sap+sta scc on indoor support
  * @fcc_rules_ptr : Value of fcc channel frequency and tx_power list received
  * from firmware
+ * @set_fcc_channel: Flag to set fcc channels
  */
 struct wlan_regulatory_psoc_priv_obj {
 	struct mas_chan_params mas_chan_params[PSOC_MAX_PHY_REG_CAP];
@@ -197,6 +198,7 @@ struct wlan_regulatory_psoc_priv_obj {
 #ifdef CONFIG_REG_CLIENT
 	struct cur_fcc_rule fcc_rules_ptr[MAX_NUM_FCC_RULES];
 #endif
+	bool set_fcc_channel;
 };
 
 /**

+ 5 - 3
umac/regulatory/core/src/reg_utils.c

@@ -750,12 +750,11 @@ QDF_STATUS reg_set_fcc_constraint(struct wlan_objmgr_pdev *pdev,
 	}
 
 	if (pdev_priv_obj->set_fcc_channel == fcc_constraint) {
-		reg_info("same fcc_constraint %d", fcc_constraint);
+		reg_debug("same fcc_constraint %d", fcc_constraint);
 		return QDF_STATUS_SUCCESS;
 	}
 
-	reg_info("set fcc_constraint: %d", fcc_constraint);
-	pdev_priv_obj->set_fcc_channel = fcc_constraint;
+	reg_debug("set fcc_constraint: %d", fcc_constraint);
 
 	psoc = wlan_pdev_get_psoc(pdev);
 	if (!psoc) {
@@ -769,6 +768,9 @@ QDF_STATUS reg_set_fcc_constraint(struct wlan_objmgr_pdev *pdev,
 		return QDF_STATUS_E_INVAL;
 	}
 
+	psoc_priv_obj->set_fcc_channel = fcc_constraint;
+	pdev_priv_obj->set_fcc_channel = fcc_constraint;
+
 	reg_compute_pdev_current_chan_list(pdev_priv_obj);
 
 	status = reg_send_scheduler_msg_sb(psoc, pdev);