Эх сурвалжийг харах

qcacmn: Add pdev data structure for MGMT Rx REO module

Add pdev data structure definitions for MGMT Rx REO module.
Add a pointer to an object of that type inside the pdev
context of MGMT_TXRX component.

Change-Id: I5214be24d776d8d1c14b3b81c89c0c0fde2654b7
CRs-Fixed: 2959074
Shiva Krishna Pittala 4 жил өмнө
parent
commit
ef3d7b71c2

+ 7 - 0
umac/cmn_services/mgmt_txrx/core/src/wlan_mgmt_txrx_main_i.h

@@ -31,6 +31,9 @@
 #include "wlan_objmgr_psoc_obj.h"
 #include "wlan_lmac_if_def.h"
 #include "qdf_list.h"
+#ifdef WLAN_MGMT_RX_REO_SUPPORT
+#include "wlan_mgmt_txrx_rx_reo_i.h"
+#endif
 
 
 #define IEEE80211_FC0_TYPE_MASK             0x0c
@@ -205,6 +208,7 @@ struct mgmt_txrx_priv_psoc_context {
  * @mgmt_txrx_stats:  pointer to mgmt txrx stats
  * @wakelock_tx_cmp:  mgmt tx complete wake lock
  * @wakelock_tx_runtime_cmp: mgmt tx runtime complete wake lock
+ * @mgmt_rx_reo_pdev_ctx: pointer to pdev object of MGMT Rx REO module
  */
 struct mgmt_txrx_priv_pdev_context {
 	struct wlan_objmgr_pdev *pdev;
@@ -212,6 +216,9 @@ struct mgmt_txrx_priv_pdev_context {
 	struct mgmt_txrx_stats_t *mgmt_txrx_stats;
 	qdf_wake_lock_t wakelock_tx_cmp;
 	qdf_runtime_lock_t wakelock_tx_runtime_cmp;
+#ifdef WLAN_MGMT_RX_REO_SUPPORT
+	struct mgmt_rx_reo_pdev_info *mgmt_rx_reo_pdev_ctx;
+#endif
 };
 
 

+ 19 - 1
umac/cmn_services/mgmt_txrx/core/src/wlan_mgmt_txrx_rx_reo_i.h

@@ -27,6 +27,7 @@
 #include <qdf_lock.h>
 #include <qdf_nbuf.h>
 #include <wlan_mgmt_txrx_utils_api.h>
+#include <wlan_mgmt_txrx_rx_reo_public_structs.h>
 
 /**
  * struct mgmt_rx_reo_list – Linked list used to reorder the management frames
@@ -60,6 +61,24 @@ struct mgmt_rx_reo_list_entry {
 	uint32_t insertion_timestamp;
 };
 
+
+struct mgmt_rx_reo_snapshot;
+/*
+ * struct mgmt_rx_reo_pdev_info - Pdev information required by the Management
+ * Rx REO module
+ * @host_or_fw_consumed_snapshot: Snapshot of latest frame consumed by Host/FW
+ * @mac_hw_snapshot: Pointer to the snapshot of latest frame seen at the MAC HW
+ * @fw_consumed_snapshot: Pointer to the snapshot of latest frame consumed
+ * by the FW
+ * @fw_forwarded_snapshot: Pointer to the snapshot of latest frame forwarded
+ * to the Host by FW
+ */
+struct mgmt_rx_reo_pdev_info {
+	struct mgmt_rx_reo_snapshot_simplified host_or_fw_consumed_snapshot;
+	struct mgmt_rx_reo_snapshot *mac_hw_snapshot;
+	struct mgmt_rx_reo_snapshot *fw_consumed_snapshot;
+	struct mgmt_rx_reo_snapshot *fw_forwarded_snapshot;
+};
 /**
  * struct mgmt_rx_reo_context - This structure holds the info required for
  * management rx-reordering. Reordering is done across all the psocs.
@@ -72,5 +91,4 @@ struct mgmt_rx_reo_context {
 	struct mgmt_rx_reo_list reo_list;
 	uint32_t global_ts_last_delivered_frame;
 };
-
 #endif /* _WLAN_MGMT_TXRX_RX_REO_I_H */

+ 44 - 0
umac/cmn_services/mgmt_txrx/dispatcher/inc/wlan_mgmt_txrx_rx_reo_public_structs.h

@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2021, The Linux Foundation. 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
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/**
+ *  DOC: wlan_mgmt_txrx_rx_reo_public_structs.h
+ *  Contains MGMT Rx REO structure definitions
+ */
+
+#ifndef _WLAN_MGMT_TXRX_RX_REO_PUBLIC_STRUCTS_H
+#define _WLAN_MGMT_TXRX_RX_REO_PUBLIC_STRUCTS_H
+
+#ifdef WLAN_MGMT_RX_REO_SUPPORT
+
+/*
+ * struct mgmt_rx_reo_snapshot_simplified - Represents the simplified version of
+ * Management Rx Frame snapshot for Host use. Note that this is different from
+ * the structure shared between the Host and FW/HW
+ * @valid: Whether this snapshot is valid
+ * @mgmt_pkt_ctr: MGMT packet counter. This will be local to a particular
+ * HW link
+ * @global_timestamp: Global timestamp.This is taken from a clock which is
+ * common across all the HW links
+ */
+struct mgmt_rx_reo_snapshot_simplified {
+	bool valid;
+	uint16_t mgmt_pkt_ctr;
+	uint32_t global_timestamp;
+};
+
+#endif /* WLAN_MGMT_RX_REO_SUPPORT */
+#endif /* _WLAN_MGMT_TXRX_RX_REO_PUBLIC_STRUCTS_H */