瀏覽代碼

Merge fa602270dbfe241983eaf76a9821691de5c6b0c1 on remote branch

Change-Id: I493c9683c51f14001c3302c8e494b604e5be7c96
Linux Build Service Account 1 年之前
父節點
當前提交
f1b09c1e95

+ 22 - 1
dp/wifi3.0/monitor/dp_mon_filter.c

@@ -301,6 +301,27 @@ bool dp_mon_skip_filter_config(struct dp_soc *soc)
 		return false;
 }
 
+/**
+ * dp_update_num_mac_rings() - Update number of MAC rings based on connection
+ *                             mode and DBS check
+ * @soc: DP soc context
+ * @mon_mac_rings: Pointer to variable for number of mac rings
+ *
+ * Return: None
+ */
+static void
+dp_update_num_mac_rings(struct dp_soc *soc, int *mon_mac_rings)
+{
+	if (soc->cdp_soc.ol_ops->get_con_mode &&
+	    soc->cdp_soc.ol_ops->get_con_mode() ==
+	    QDF_GLOBAL_MISSION_MODE &&
+	    (QDF_MONITOR_FLAG_OTHER_BSS & soc->mon_flags)) {
+		*mon_mac_rings = 1;
+	} else {
+		dp_update_num_mac_rings_for_dbs(soc, mon_mac_rings);
+	}
+}
+
 QDF_STATUS
 dp_mon_ht2_rx_ring_cfg(struct dp_soc *soc,
 		       struct dp_pdev *pdev,
@@ -322,7 +343,7 @@ dp_mon_ht2_rx_ring_cfg(struct dp_soc *soc,
 	 * Overwrite the max_mac_rings for the status rings.
 	 */
 	if (srng_type == DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS)
-		dp_update_num_mac_rings_for_dbs(soc, &max_mac_rings);
+		dp_update_num_mac_rings(soc, &max_mac_rings);
 
 	dp_mon_filter_info("%pK: srng type %d Max_mac_rings %d ",
 			   soc, srng_type, max_mac_rings);

+ 4 - 6
umac/cmn_services/serialization/src/wlan_serialization_scan.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022, 2024 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
@@ -206,11 +206,9 @@ wlan_ser_cancel_scan_cmd(
 					 struct wlan_serialization_command_list,
 					 pdev_node);
 
-		if (cmd &&
-		    !(wlan_serialization_match_cmd_id_type(nnode, cmd,
-							  WLAN_SER_PDEV_NODE) &&
-		      wlan_serialization_match_cmd_vdev(nnode, cmd->vdev,
-							WLAN_SER_PDEV_NODE))) {
+		if (cmd && !wlan_serialization_match_cmd_id_type(
+							nnode, cmd,
+							WLAN_SER_PDEV_NODE)) {
 			pnode = nnode;
 			continue;
 		}

+ 22 - 2
umac/cp_stats/core/src/wlan_cp_stats_chipset_stats.c

@@ -19,15 +19,24 @@
 #include <qdf_module.h>
 #include <wlan_nlink_common.h>
 #include <wlan_cp_stats_chipset_stats.h>
+#include "wlan_cp_stats_obj_mgr_handler.h"
 
-struct chipset_stats cstats;
+static struct chipset_stats cstats;
 static struct cstats_node *gcstats_buffer[CSTATS_MAX_TYPE];
 
-QDF_STATUS wlan_cp_stats_cstats_init(void)
+QDF_STATUS wlan_cp_stats_cstats_init(struct wlan_objmgr_psoc *psoc)
 {
 	qdf_list_node_t *tmp_node = NULL;
 	int i, j, k;
 
+	if (!wlan_cp_stats_get_chipset_stats_enable(psoc)) {
+		qdf_info("Chipset Stats feature is disabled");
+		cstats.is_cstats_ini_enabled = false;
+		return QDF_STATUS_SUCCESS;
+	}
+
+	cstats.is_cstats_ini_enabled = true;
+
 	for (i = 0; i < CSTATS_MAX_TYPE; i++) {
 		qdf_spinlock_create(&cstats.cstats_lock[i]);
 
@@ -75,6 +84,11 @@ void wlan_cp_stats_cstats_deinit(void)
 {
 	int i;
 
+	if (!cstats.is_cstats_ini_enabled) {
+		qdf_info("Chipset Stats feature is disabled");
+		return;
+	}
+
 	for (i = 0; i < CSTATS_MAX_TYPE; i++) {
 		qdf_spin_lock_bh(&cstats.cstats_lock[i]);
 		cstats.ccur_node[i] = NULL;
@@ -130,6 +144,9 @@ void wlan_cp_stats_cstats_write_to_buff(enum cstats_types type,
 	unsigned int *pfilled_length;
 	unsigned int tlen;
 
+	if (!cstats.is_cstats_ini_enabled)
+		return;
+
 	/* tAniNlHdr + Start Marker + End Marker */
 	tlen = sizeof(tAniNlHdr) + (2 * CSTATS_MARKER_SZ);
 
@@ -219,6 +236,9 @@ int wlan_cp_stats_cstats_send_buffer_to_user(enum cstats_types type)
 	int mark_total;
 	char *ptr = NULL;
 
+	if (!cstats.is_cstats_ini_enabled)
+		return QDF_STATUS_SUCCESS;
+
 	qdf_spin_lock_bh(&cstats.cstats_lock[type]);
 	wlan_cp_stats_get_cstats_free_node(type);
 	qdf_spin_unlock_bh(&cstats.cstats_lock[type]);

+ 21 - 0
umac/cp_stats/core/src/wlan_cp_stats_obj_mgr_handler.c

@@ -33,6 +33,9 @@
 #include <target_if_cp_stats.h>
 #include <wlan_twt_public_structs.h>
 #include <wlan_cp_stats_chipset_stats.h>
+#ifdef WLAN_CHIPSET_STATS
+#include <cfg_ucfg_api.h>
+#endif
 
 #ifdef WLAN_CHIPSET_STATS
 int wlan_cp_stats_cstats_qmi_event_handler(void *cb_ctx, uint16_t type,
@@ -56,6 +59,18 @@ wlan_cp_stats_cstats_register_qmi_event_handler(struct cp_stats_context *csc)
 		cp_stats_err("cstats QMI evt handler registration failed");
 }
 
+void wlan_cp_stats_init_cfg(struct wlan_objmgr_psoc *psoc,
+			    struct cp_stats_context *csc)
+{
+	if (!psoc) {
+		cp_stats_err("psoc is NULL");
+		return;
+	}
+
+	csc->host_params.chipset_stats_enable =
+				cfg_get(psoc, CHIPSET_STATS_ENABLE);
+}
+
 bool wlan_cp_stats_get_chipset_stats_enable(struct wlan_objmgr_psoc *psoc)
 {
 	struct cp_stats_context *csc;
@@ -185,6 +200,10 @@ wlan_cp_stats_psoc_obj_create_handler(struct wlan_objmgr_psoc *psoc, void *arg)
 						       WLAN_UMAC_COMP_CP_STATS,
 						       csc,
 						       QDF_STATUS_SUCCESS);
+	if (QDF_IS_STATUS_SUCCESS(status)) {
+		wlan_cp_stats_init_cfg(psoc, csc);
+		wlan_cp_stats_cstats_init(psoc);
+	}
 
 wlan_cp_stats_psoc_obj_create_handler_return:
 	if (QDF_IS_STATUS_ERROR(status)) {
@@ -226,6 +245,8 @@ wlan_cp_stats_psoc_obj_destroy_handler(struct wlan_objmgr_psoc *psoc, void *arg)
 		return QDF_STATUS_E_INVAL;
 	}
 
+	wlan_cp_stats_cstats_deinit();
+
 	wlan_objmgr_psoc_component_obj_detach(psoc,
 					      WLAN_UMAC_COMP_CP_STATS, csc);
 	if (csc->cp_stats_psoc_obj_deinit)

+ 16 - 0
umac/cp_stats/core/src/wlan_cp_stats_obj_mgr_handler.h

@@ -230,6 +230,22 @@ bool wlan_cp_stats_get_chipset_stats_enable(struct wlan_objmgr_psoc *psoc);
  */
 int wlan_cp_stats_cstats_qmi_event_handler(void *cb_ctx, uint16_t type,
 					   void *event, int event_len);
+
+/**
+ * wlan_cp_stats_init_cfg() - update cp_stats_context with ini value
+ *
+ * @psoc: pointer to psoc
+ * @csc: pointer to cp_stats_context
+ *
+ * Return : void
+ */
+void wlan_cp_stats_init_cfg(struct wlan_objmgr_psoc *psoc,
+			    struct cp_stats_context *csc);
+#else
+static inline void wlan_cp_stats_init_cfg(struct wlan_objmgr_psoc *psoc,
+					  struct cp_stats_context *csc)
+{
+}
 #endif /* WLAN_CHIPSET_STATS */
 
 #endif /* QCA_SUPPORT_CP_STATS */

+ 6 - 2
umac/cp_stats/dispatcher/inc/wlan_cp_stats_chipset_stats.h

@@ -83,6 +83,7 @@ struct chipset_stats {
 	/* Dont move filled list nodes to free list after flush to user space */
 	bool cstats_no_flush[CSTATS_MAX_TYPE];
 	struct cstats_tx_rx_ops ops;
+	bool is_cstats_ini_enabled;
 };
 
 #define wlan_cstats_fw_stats(len, buf) \
@@ -94,9 +95,11 @@ struct chipset_stats {
 /**
  * wlan_cp_stats_cstats_init() - Initialize chipset stats infra
  *
+ * @psoc: pointer to psoc object
+ *
  * Return: QDF_STATUS
  */
-QDF_STATUS wlan_cp_stats_cstats_init(void);
+QDF_STATUS wlan_cp_stats_cstats_init(struct wlan_objmgr_psoc *psoc);
 
 /**
  * wlan_cp_stats_cstats_deinit() - Deinitialize chipset stats infra
@@ -156,7 +159,8 @@ void wlan_cp_stats_cstats_pkt_log(uint8_t *sa, uint8_t *da,
 				  enum qdf_dp_tx_rx_status status,
 				  uint8_t vdev_id, enum QDF_OPMODE op_mode);
 #else
-static inline QDF_STATUS wlan_cp_stats_cstats_init(void)
+static inline QDF_STATUS
+wlan_cp_stats_cstats_init(struct wlan_objmgr_psoc *psoc)
 {
 	return 0;
 }

+ 11 - 0
umac/cp_stats/dispatcher/inc/wlan_cp_stats_chipset_stats_events.h

@@ -66,6 +66,7 @@ enum qca_chipset_stats_event_type {
 	WLAN_CHIPSET_STATS_NAN_NDP_INDICATION_EVENT_ID,
 	WLAN_CHIPSET_STATS_NAN_NDP_NEW_PEER_EVENT_ID,
 	WLAN_CHIPSET_STATS_DATA_PKT_EVENT_ID,
+	WLAN_CHIPSET_STATS_CSA_EVENT_ID,
 	WLAN_CHIPSET_STATS_MAX_EVENT_ID,
 };
 
@@ -493,4 +494,14 @@ struct cstats_pkt_info {
 	uint8_t status;
 } qdf_packed;
 
+struct cstats_csa_evt {
+	struct cstats_cmn cmn;
+	uint8_t direction;
+	uint16_t target_freq;
+	uint8_t target_ch_width;
+	uint16_t current_freq;
+	uint8_t current_ch_width;
+	uint8_t switch_mode;
+} qdf_packed;
+
 #endif /* __WLAN_CP_STATS_CHIPSET_STATS_EVENTS_H */

+ 0 - 28
umac/cp_stats/dispatcher/src/wlan_cp_stats_utils_api.c

@@ -107,12 +107,6 @@ QDF_STATUS wlan_cp_stats_init(void)
 		goto wlan_cp_stats_peer_init_fail2;
 	}
 
-	status = wlan_cp_stats_cstats_init();
-	if (QDF_IS_STATUS_ERROR(status)) {
-		cp_stats_err("Failed to init chipset stats");
-		goto wlan_cp_stats_peer_init_fail2;
-	}
-
 	return QDF_STATUS_SUCCESS;
 
 wlan_cp_stats_peer_init_fail2:
@@ -158,8 +152,6 @@ QDF_STATUS wlan_cp_stats_deinit(void)
 {
 	QDF_STATUS status = QDF_STATUS_E_FAILURE;
 
-	wlan_cp_stats_cstats_deinit();
-
 	status = wlan_objmgr_unregister_psoc_create_handler
 				(WLAN_UMAC_COMP_CP_STATS,
 				 wlan_cp_stats_psoc_obj_create_handler,
@@ -219,25 +211,6 @@ QDF_STATUS wlan_cp_stats_deinit(void)
 	return status;
 }
 
-#ifdef WLAN_CHIPSET_STATS
-static void wlan_cp_stats_init_cfg(struct wlan_objmgr_psoc *psoc,
-				   struct cp_stats_context *csc)
-{
-	if (!psoc) {
-		cp_stats_err("psoc is NULL");
-		return;
-	}
-	csc->host_params.chipset_stats_enable =
-			cfg_get(psoc, CHIPSET_STATS_ENABLE);
-}
-#else
-static inline
-void wlan_cp_stats_init_cfg(struct wlan_objmgr_psoc *psoc,
-			    struct cp_stats_context *csc)
-{
-}
-#endif
-
 /* DA/OL specific call back initialization */
 QDF_STATUS wlan_cp_stats_open(struct wlan_objmgr_psoc *psoc)
 {
@@ -254,7 +227,6 @@ QDF_STATUS wlan_cp_stats_open(struct wlan_objmgr_psoc *psoc)
 		cp_stats_err("cp_stats_context is null!");
 		return QDF_STATUS_E_FAILURE;
 	}
-	wlan_cp_stats_init_cfg(psoc, csc);
 
 	if (csc->cp_stats_open)
 		status = csc->cp_stats_open(psoc);

+ 21 - 10
umac/mlme/connection_mgr/core/src/wlan_cm_connect.c

@@ -535,28 +535,39 @@ void cm_set_vdev_link_id(struct cnx_mgr *cm_ctx,
 	wlan_vdev_set_link_id(cm_ctx->vdev, link_id);
 }
 
+static inline
+bool cm_is_ml_connection(struct wlan_objmgr_vdev *vdev,
+			 struct cm_connect_req *req)
+{
+	struct qdf_mac_addr *mld_mac;
+	bool eht_capab;
+
+	wlan_psoc_mlme_get_11be_capab(wlan_vdev_get_psoc(vdev), &eht_capab);
+	mld_mac = (struct qdf_mac_addr *)wlan_vdev_mlme_get_mldaddr(vdev);
+
+	if (eht_capab && !qdf_is_macaddr_zero(mld_mac) &&
+	    req->cur_candidate->entry->ie_list.multi_link_bv &&
+	    wlan_cm_is_eht_allowed_for_current_security(wlan_vdev_get_psoc(vdev),
+							req->cur_candidate->entry,
+							true))
+		return true;
+
+	return false;
+}
+
 static QDF_STATUS cm_update_vdev_mlme_macaddr(struct cnx_mgr *cm_ctx,
 					      struct cm_connect_req *req)
 {
 	struct qdf_mac_addr *mac;
-	bool eht_capab;
 	struct wlan_objmgr_vdev *vdev = cm_ctx->vdev;
 	uint8_t vdev_id = wlan_vdev_get_id(vdev);
 
 	if (wlan_vdev_mlme_get_opmode(vdev) != QDF_STA_MODE)
 		return QDF_STATUS_SUCCESS;
 
-	wlan_psoc_mlme_get_11be_capab(wlan_vdev_get_psoc(vdev), &eht_capab);
-	if (!eht_capab)
-		return QDF_STATUS_SUCCESS;
-
 	mac = (struct qdf_mac_addr *)wlan_vdev_mlme_get_mldaddr(vdev);
 
-	if (req->cur_candidate->entry->ie_list.multi_link_bv &&
-	    !qdf_is_macaddr_zero(mac) &&
-	    wlan_cm_is_eht_allowed_for_current_security(wlan_vdev_get_psoc(vdev),
-							req->cur_candidate->entry,
-							true)) {
+	if (cm_is_ml_connection(vdev, req)) {
 		wlan_vdev_obj_lock(vdev);
 		/* Use link address for ML connection */
 		wlan_vdev_mlme_set_macaddr(vdev, vdev->vdev_mlme.linkaddr);

+ 10 - 4
umac/mlme/connection_mgr/core/src/wlan_cm_disconnect.c

@@ -431,12 +431,18 @@ QDF_STATUS cm_disconnect_active(struct cnx_mgr *cm_ctx, wlan_cm_id *cm_id)
 	reason_code = cm_req->discon_req.req.reason_code;
 	source = cm_req->discon_req.req.source;
 	op_mode = wlan_vdev_mlme_get_opmode(cm_ctx->vdev);
-	mlme_debug("op_mode:%d, source:%d, reason_code:%d", op_mode, source,
-		   reason_code);
+	mlme_debug(CM_PREFIX_FMT " source %d reason %d",
+		   CM_PREFIX_REF(wlan_vdev_get_id(cm_ctx->vdev), *cm_id),
+		   source, reason_code);
 
+	/*
+	 * Don't send RSO stop for internal link cleanup, as it clears the
+	 * RCL in firmware.
+	 */
 	if (op_mode == QDF_STA_MODE &&
-	    (reason_code != REASON_FW_TRIGGERED_ROAM_FAILURE) &&
-	    (source != CM_MLO_ROAM_INTERNAL_DISCONNECT))
+	    !wlan_vdev_mlme_is_mlo_link_vdev(cm_ctx->vdev) &&
+	    source != CM_MLO_ROAM_INTERNAL_DISCONNECT &&
+	    reason_code != REASON_FW_TRIGGERED_ROAM_FAILURE)
 		status = mlme_cm_rso_stop_req(cm_ctx->vdev);
 
 	if (status != QDF_STATUS_E_NOSUPPORT)

+ 6 - 1
umac/mlo_mgr/src/wlan_mlo_mgr_main.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2021, The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2024 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 above
@@ -1147,6 +1147,11 @@ static QDF_STATUS mlo_dev_ctx_init(struct wlan_objmgr_vdev *vdev)
 		return QDF_STATUS_SUCCESS;
 	}
 
+	if (qdf_list_size(&g_mlo_ctx->ml_dev_list) >= WLAN_UMAC_MLO_MAX_DEV) {
+		mlo_err("No more MLD allowed");
+		return QDF_STATUS_E_RESOURCES;
+	}
+
 	/* Create a new ML dev context */
 	ml_dev = qdf_mem_malloc(sizeof(*ml_dev));
 	if (!ml_dev) {

+ 11 - 7
umac/scan/dispatcher/src/wlan_scan_utils_api.c

@@ -2258,9 +2258,10 @@ util_get_ml_bv_partner_link_info(struct wlan_objmgr_pdev *pdev,
 							      true);
 
 			if (!link_info->freq)
-				scm_debug("freq 0 rnr channel %u op_class %u",
-					  rnr->channel_number,
-					  rnr->operating_class);
+				scm_debug_rl("freq 0 rnr channel %u op_class %u " QDF_MAC_ADDR_FMT,
+					     rnr->channel_number,
+					     rnr->operating_class,
+					     QDF_MAC_ADDR_REF(rnr->bssid.bytes));
 			link_info->op_class = rnr->operating_class;
 			link_idx++;
 		}
@@ -2270,7 +2271,7 @@ util_get_ml_bv_partner_link_info(struct wlan_objmgr_pdev *pdev,
 	scan_entry->ml_info.num_links = link_idx;
 	if (!offset ||
 	    (offset + sizeof(struct wlan_ml_bv_linfo_perstaprof) >= ml_ie_len)) {
-		scm_err_rl("incorrect offset value %d", offset);
+		scm_debug_rl("incorrect offset value %d", offset);
 		return;
 	}
 
@@ -2293,9 +2294,11 @@ util_get_ml_bv_partner_link_info(struct wlan_objmgr_pdev *pdev,
 
 		if (!(end_ptr <= (ml_ie + ml_ie_len))) {
 			if (ml_ie[TAG_LEN_POS] >= 255)
-				scm_debug("Possible fragmentation in ml_ie. Ignore the processing");
+				scm_debug_rl("Possible fragmentation in ml_ie for tag_len %d. Ignore the processing",
+					     ml_ie[TAG_LEN_POS]);
 			else
-				scm_debug("perstaprof exceeds ML IE boundary. Ignore the processing");
+				scm_debug_rl("perstaprof exceeds ML IE boundary for tag_len %d. Ignore the processing",
+					     ml_ie[TAG_LEN_POS]);
 			return;
 		}
 
@@ -2342,7 +2345,8 @@ util_get_ml_bv_partner_link_info(struct wlan_objmgr_pdev *pdev,
 					(WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_SIZE +
 					 perstaprof_stainfo_len);
 		} else {
-			scm_debug("No STA profile IE list found");
+			scm_debug_rl("No STA profile IE list found for perstaprof_stainfo_len %d perstaprof_len %d",
+				     perstaprof_stainfo_len, perstaprof_len);
 			ielist_len = 0;
 		}
 

+ 2 - 0
wmi/inc/wmi_unified_param.h

@@ -1974,10 +1974,12 @@ struct mlo_prb_resp_tmpl_ml_info {
  * @prb_rsp_template_frm: pointer to template probe response template
  * @prb_rsp_template_len: length of probe response template
  * @cu_ml_info: Impacted link critical update information
+ * @go_ignore_non_p2p_probe_req: go ignore non-p2p probe req
  */
 struct wmi_probe_resp_params {
 	uint8_t *prb_rsp_template_frm;
 	uint32_t prb_rsp_template_len;
+	bool go_ignore_non_p2p_probe_req;
 #ifdef WLAN_FEATURE_11BE_MLO
 	struct mlo_prb_resp_tmpl_ml_info cu_ml_info;
 #endif

+ 2 - 0
wmi/src/wmi_unified_tlv.c

@@ -5938,6 +5938,8 @@ static QDF_STATUS send_probe_rsp_tmpl_send_cmd_tlv(wmi_unified_t wmi_handle,
 		       WMITLV_TAG_STRUC_wmi_prb_tmpl_cmd_fixed_param,
 		       WMITLV_GET_STRUCT_TLVLEN(wmi_prb_tmpl_cmd_fixed_param));
 	cmd->vdev_id = vdev_id;
+	cmd->flags = probe_rsp_info->go_ignore_non_p2p_probe_req;
+
 	cmd->buf_len = tmpl_len;
 	buf_ptr += sizeof(wmi_prb_tmpl_cmd_fixed_param);