瀏覽代碼

qcacmn: Add m_copy wrapper in cfg80211tool

Added lite_mon wrapper for m_copy in
cfg80211tool.

Change-Id: I699f34b9eba2b547f13147e4757ccea42d60f656
CRs-Fixed: 3380811
Aniruddha Mishra 2 年之前
父節點
當前提交
73ff25850d

+ 30 - 1
dp/inc/cdp_txrx_mon.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2016-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
@@ -217,6 +217,35 @@ cdp_is_lite_mon_enabled(ol_txrx_soc_handle soc,
 
 	return soc->ops->mon_ops->txrx_is_lite_mon_enabled(soc, pdev_id, dir);
 }
+
+/*
+ * cdp_get_lite_mon_legacy_feature_enabled() - Get the legacy feature enabled
+ *
+ * @soc: dp soc handle
+ * @pdev_id: pdev id
+ * @dir: direction tx/rx
+ *
+ *  This API is used to get the legacy feature enabled using lite_mon
+ *
+ * Return: legacy feature enabled
+ */
+static inline int
+cdp_get_lite_mon_legacy_feature_enabled(ol_txrx_soc_handle soc,
+					uint8_t pdev_id, uint8_t dir)
+{
+	if (!soc || !soc->ops) {
+		dp_cdp_debug("Invalid Instance");
+		return 0;
+	}
+
+	if (!soc->ops->mon_ops ||
+	    !soc->ops->mon_ops->txrx_get_lite_mon_legacy_feature_enabled)
+		return 0;
+
+	return soc->ops->mon_ops->txrx_get_lite_mon_legacy_feature_enabled(soc,
+									   pdev_id,
+									   dir);
+}
 #endif
 
 #ifdef QCA_RSSI_DB2DBM

+ 21 - 1
dp/inc/cdp_txrx_mon_struct.h

@@ -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-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
@@ -43,6 +43,24 @@
 /* This should align with nac mac type enumerations in ieee80211_ioctl.h */
 #define CDP_LITE_MON_PEER_MAC_TYPE_CLIENT 2
 
+/**
+ * enum cdp_lite_mon legacy_filter: legacy filters for tx/rx
+ * @LEGACY_FILTER_DISABLED: No filter / filter disabled
+ * @LEGACY_FILTER_MCOPY: M_Copy filter
+ * @LEGACY_FILTER_TX_CAPTURE: Tx_Capture filter
+ * @LEGACY_FILTER_RX_ENH_CAPTURE: Rx Enhance capture filter
+ * @LEGACY_FILTER_ADV_MON_FILTER: Advance Monitor filter
+ *
+ * Use to identify which filter is currently enabled using lite mon
+ */
+enum cdp_lite_mon_legacy_filter {
+	LEGACY_FILTER_DISABLED = 0,
+	LEGACY_FILTER_MCOPY = 1,
+	LEGACY_FILTER_TX_CAPTURE = 2,
+	LEGACY_FILTER_RX_ENH_CAPTURE = 3,
+	LEGACY_FILTER_ADV_MON_FILTER = 4,
+};
+
 /* lite mon frame levels */
 enum cdp_lite_mon_level {
 	/* level invalid */
@@ -491,6 +509,7 @@ struct cdp_pdev_mon_stats {
  * @len: mgmt/ctrl/data frame lens
  * @debug: debug options
  * @vdev_id: output vdev id
+ * @legacy_filter_enabled: legacy filter currently enabled
  */
 struct cdp_lite_mon_filter_config {
 	uint8_t direction;
@@ -503,6 +522,7 @@ struct cdp_lite_mon_filter_config {
 	uint16_t len[CDP_MON_FRM_TYPE_MAX];
 	uint8_t debug;
 	uint8_t vdev_id;
+	uint8_t legacy_filter_enabled;
 };
 
 /**

+ 7 - 0
dp/inc/cdp_txrx_ops.h

@@ -971,6 +971,7 @@ struct cdp_me_ops {
  * @txrx_set_advance_monitor_filter: set advanced monitor mode
  * @config_full_mon_mode: configure full monitor mode
  * @txrx_enable_mon_reap_timer: Enable/Disable reap timer of monitor status ring
+ * @txrx_get_lite_mon_legacy_feature_enabled: returns the legacy filter enabled
  */
 struct cdp_mon_ops {
 
@@ -1035,6 +1036,12 @@ struct cdp_mon_ops {
 	(*txrx_is_lite_mon_enabled)(struct cdp_soc_t *soc,
 				    uint8_t pdev_id,
 				    uint8_t direction);
+
+	/* get the legacy feature enabled */
+	int
+	(*txrx_get_lite_mon_legacy_feature_enabled)(struct cdp_soc_t *soc,
+						    uint8_t pdev_id,
+						    uint8_t direction);
 #endif
 	/*To set RSSI dbm conversion params in monitor pdev */
 	QDF_STATUS (*txrx_set_mon_pdev_params_rssi_dbm_conv)

+ 2 - 1
dp/wifi3.0/monitor/1.0/dp_mon_1.0.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2021, The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-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 above
@@ -1312,6 +1312,7 @@ struct cdp_mon_ops dp_ops_mon_1_0 = {
 	.txrx_set_lite_mon_peer_config = NULL,
 	.txrx_get_lite_mon_peer_config = NULL,
 	.txrx_is_lite_mon_enabled = NULL,
+	.txrx_get_lite_mon_legacy_feature_enabled = NULL,
 #endif
 	.txrx_set_mon_pdev_params_rssi_dbm_conv =
 				dp_mon_pdev_params_rssi_dbm_conv,

+ 3 - 1
dp/wifi3.0/monitor/2.0/dp_mon_2.0.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2021, The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-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 above
@@ -1556,6 +1556,8 @@ struct cdp_mon_ops dp_ops_mon_2_0 = {
 	.txrx_set_lite_mon_peer_config = dp_lite_mon_set_peer_config,
 	.txrx_get_lite_mon_peer_config = dp_lite_mon_get_peer_config,
 	.txrx_is_lite_mon_enabled = dp_lite_mon_is_enabled,
+	.txrx_get_lite_mon_legacy_feature_enabled =
+				dp_lite_mon_get_legacy_feature_enabled,
 #endif
 	.txrx_set_mon_pdev_params_rssi_dbm_conv =
 				dp_mon_pdev_params_rssi_dbm_conv,

+ 9 - 1
dp/wifi3.0/monitor/dp_mon.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-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 above
@@ -4311,6 +4311,14 @@ dp_lite_mon_rx_mpdu_process(struct dp_pdev *pdev,
 {
 	return QDF_STATUS_E_FAILURE;
 }
+
+static inline int
+dp_lite_mon_get_legacy_feature_enabled(struct cdp_soc_t *soc,
+				       uint8_t pdev_id,
+				       uint8_t direction)
+{
+	return 0;
+}
 #endif
 
 #ifdef WLAN_TELEMETRY_STATS_SUPPORT