Ver código fonte

qcacmn: Check ext cc event support before pouplating sec chan list

Currently host is populating secondary channel list from master
channel list based on ap power type. In case fw doesn't support
extd cc event then secondary channel list will not have 6g freq,
which may break legacy 6g handling.

Fix is to add validation check for ext cc event support, copy
secondary channel list from ap power type in case ext cc event
is supported by fw else copy secondary channel list from reg
current channel list.

Change-Id: I2e13be2936b624ccbee5e8e426987355076a0062
CRs-Fixed: 2987951
sheenam monga 4 anos atrás
pai
commit
c22a0bcc59

+ 4 - 1
target_if/init_deinit/src/init_event_handler.c

@@ -285,8 +285,11 @@ static int init_deinit_service_ext2_ready_event_handler(ol_scn_t scn_handle,
 		goto exit;
 
 	if (wmi_service_enabled(wmi_handle,
-				wmi_service_reg_cc_ext_event_support))
+				wmi_service_reg_cc_ext_event_support)) {
 		target_if_set_reg_cc_ext_supp(tgt_hdl, psoc);
+		wlan_psoc_nif_fw_ext_cap_set(psoc,
+					     WLAN_SOC_EXT_EVENT_SUPPORTED);
+	}
 
 	/* dbr_ring_caps could have already come as part of EXT event */
 	if (info->service_ext2_param.num_dbr_ring_caps) {

+ 2 - 0
umac/cmn_services/obj_mgr/inc/wlan_objmgr_psoc_obj.h

@@ -150,6 +150,8 @@
 #define WLAN_SOC_RTT_AP_INITIATOR_STAGGERED_MODE_SUPPORTED 0x04000000
 	/* AP initiator mode supported in burst beacon mode */
 #define WLAN_SOC_RTT_AP_INITIATOR_BURSTED_MODE_SUPPORTED 0x08000000
+	/* ext cc event supported by fw */
+#define WLAN_SOC_EXT_EVENT_SUPPORTED      0x010000000
 
 /* feature_flags */
 	/* CONF: ATH FF enabled */

+ 28 - 5
umac/regulatory/core/src/reg_build_chan_list.c

@@ -1047,15 +1047,38 @@ static void
 reg_populate_secondary_cur_chan_list(struct wlan_regulatory_pdev_priv_obj
 				     *pdev_priv_obj)
 {
-	qdf_mem_copy(pdev_priv_obj->secondary_cur_chan_list,
-		     pdev_priv_obj->cur_chan_list,
-		     (NUM_CHANNELS - NUM_6GHZ_CHANNELS) *
-		     sizeof(struct regulatory_channel));
-	qdf_mem_copy(&pdev_priv_obj->
+	struct wlan_objmgr_psoc *psoc;
+	struct wlan_lmac_if_reg_tx_ops *reg_tx_ops;
+
+	psoc = wlan_pdev_get_psoc(pdev_priv_obj->pdev_ptr);
+	if (!psoc) {
+		reg_err("psoc is NULL");
+		return;
+	}
+
+	reg_tx_ops = reg_get_psoc_tx_ops(psoc);
+	if (!reg_tx_ops) {
+		reg_err("reg_tx_ops null");
+		return;
+	}
+	if (reg_tx_ops->register_master_ext_handler &&
+	    wlan_psoc_nif_fw_ext_cap_get(psoc, WLAN_SOC_EXT_EVENT_SUPPORTED)) {
+		qdf_mem_copy(pdev_priv_obj->secondary_cur_chan_list,
+			     pdev_priv_obj->cur_chan_list,
+			     (NUM_CHANNELS - NUM_6GHZ_CHANNELS) *
+			     sizeof(struct regulatory_channel));
+
+		qdf_mem_copy(&pdev_priv_obj->
 		     secondary_cur_chan_list[MIN_6GHZ_CHANNEL],
 		     pdev_priv_obj->mas_chan_list_6g_ap
 		     [pdev_priv_obj->reg_cur_6g_ap_pwr_type],
 		     NUM_6GHZ_CHANNELS * sizeof(struct regulatory_channel));
+	} else {
+		qdf_mem_copy(pdev_priv_obj->secondary_cur_chan_list,
+			     pdev_priv_obj->cur_chan_list,
+			     (NUM_CHANNELS) *
+			     sizeof(struct regulatory_channel));
+	}
 }
 #else /* CONFIG_REG_CLIENT */
 static void