فهرست منبع

qcacmn: Add mgmt Rx REO scheduler debug support

Add support for mgmt Rx REO scheduler debug.

CRs-Fixed: 3409291
Change-Id: I5027fb4196d3d072fe4ade880eb217bcef47a6d3
Edayilliam Jayadev 2 سال پیش
والد
کامیت
d3f1f54f3f

+ 278 - 2
umac/cmn_services/mgmt_txrx/core/src/wlan_mgmt_txrx_rx_reo.c

@@ -1555,11 +1555,14 @@ static QDF_STATUS
 mgmt_rx_reo_debug_print_egress_frame_stats(struct mgmt_rx_reo_context *reo_ctx)
 {
 	struct reo_egress_frame_stats *stats;
+	struct reo_scheduler_stats *scheduler_stats;
 	uint8_t link_id;
 	uint8_t reason;
 	uint64_t total_delivery_attempts_count = 0;
 	uint64_t total_delivery_success_count = 0;
 	uint64_t total_premature_delivery_count = 0;
+	uint64_t total_scheduled_count = 0;
+	uint64_t total_rescheduled_count = 0;
 	uint64_t delivery_count_per_link[MAX_MLO_LINKS] = {0};
 	uint64_t delivery_count_per_reason[RELEASE_REASON_MAX] = {0};
 	uint64_t total_delivery_count = 0;
@@ -1570,6 +1573,7 @@ mgmt_rx_reo_debug_print_egress_frame_stats(struct mgmt_rx_reo_context *reo_ctx)
 		return QDF_STATUS_E_NULL_VALUE;
 
 	stats = &reo_ctx->egress_frame_debug_info.stats;
+	scheduler_stats = &reo_ctx->scheduler_debug_info.stats;
 
 	for (link_id = 0; link_id < MAX_MLO_LINKS; link_id++) {
 		total_delivery_attempts_count +=
@@ -1578,6 +1582,10 @@ mgmt_rx_reo_debug_print_egress_frame_stats(struct mgmt_rx_reo_context *reo_ctx)
 				stats->delivery_success_count[link_id];
 		total_premature_delivery_count +=
 				stats->premature_delivery_count[link_id];
+		total_scheduled_count +=
+				scheduler_stats->scheduled_count[link_id];
+		total_rescheduled_count +=
+				scheduler_stats->rescheduled_count[link_id];
 	}
 
 	for (link_id = 0; link_id < MAX_MLO_LINKS; link_id++) {
@@ -1655,6 +1663,21 @@ mgmt_rx_reo_debug_print_egress_frame_stats(struct mgmt_rx_reo_context *reo_ctx)
 			  delivery_count_per_link[5],
 			  total_delivery_count);
 
+	mgmt_rx_reo_alert("\t3) Scheduler stats:");
+	mgmt_rx_reo_alert("\t------------------------------------");
+	mgmt_rx_reo_alert("\t|link id   |Scheduled |Rescheduled |");
+	mgmt_rx_reo_alert("\t|          | count    | count      |");
+	mgmt_rx_reo_alert("\t------------------------------------");
+	for (link_id = 0; link_id < MAX_MLO_LINKS; link_id++) {
+		mgmt_rx_reo_alert("\t|%10u|%10llu|%12llu|", link_id,
+				  scheduler_stats->scheduled_count[link_id],
+				  scheduler_stats->rescheduled_count[link_id]);
+	mgmt_rx_reo_alert("\t------------------------------------");
+	}
+	mgmt_rx_reo_alert("\t%11s|%10llu|%12llu|\n\n", "",
+			  total_scheduled_count,
+			  total_rescheduled_count);
+
 	return QDF_STATUS_SUCCESS;
 }
 
@@ -2165,6 +2188,116 @@ mgmt_rx_reo_is_entry_ready_to_send_up(struct mgmt_rx_reo_list_entry *entry)
 	       LIST_ENTRY_IS_OLDER_THAN_READY_TO_DELIVER_FRAMES(entry);
 }
 
+#ifdef WLAN_MGMT_RX_REO_DEBUG_SUPPORT
+/**
+ * mgmt_rx_reo_scheduler_debug_info_enabled() - API to check whether scheduler
+ * debug feaure is enabled
+ * @scheduler_debug_info: Pointer to scheduler debug info object
+ *
+ * Return: true or false
+ */
+static bool
+mgmt_rx_reo_scheduler_debug_info_enabled
+			(struct reo_scheduler_debug_info *scheduler_debug_info)
+{
+	return scheduler_debug_info->frame_list_size;
+}
+
+/**
+ * mgmt_rx_reo_log_scheduler_debug_info() - Log the information about a
+ * frame getting scheduled by mgmt rx reo scheduler
+ * @reo_ctx: management rx reorder context
+ * @entry: Pointer to reorder list entry
+ * @context: Current execution context
+ * @reschedule: Indicates rescheduling
+ *
+ * Return: QDF_STATUS of operation
+ */
+static QDF_STATUS
+mgmt_rx_reo_log_scheduler_debug_info(struct mgmt_rx_reo_context *reo_ctx,
+				     struct mgmt_rx_reo_list_entry *entry,
+				     enum mgmt_rx_reo_execution_context context,
+				     bool reschedule)
+{
+	struct reo_scheduler_debug_info *scheduler_debug_info;
+	struct reo_scheduler_debug_frame_info *cur_frame_debug_info;
+	struct reo_scheduler_stats *stats;
+	uint8_t link_id;
+
+	if (!reo_ctx || !entry)
+		return QDF_STATUS_E_NULL_VALUE;
+
+	scheduler_debug_info = &reo_ctx->scheduler_debug_info;
+
+	stats = &scheduler_debug_info->stats;
+	link_id = mgmt_rx_reo_get_link_id(entry->rx_params);
+	stats->scheduled_count[link_id]++;
+	if (reschedule)
+		stats->rescheduled_count[link_id]++;
+
+	if (!mgmt_rx_reo_scheduler_debug_info_enabled(scheduler_debug_info))
+		return QDF_STATUS_SUCCESS;
+
+	cur_frame_debug_info = &scheduler_debug_info->frame_list
+			[scheduler_debug_info->next_index];
+
+	cur_frame_debug_info->link_id = link_id;
+	cur_frame_debug_info->mgmt_pkt_ctr =
+				mgmt_rx_reo_get_pkt_counter(entry->rx_params);
+	cur_frame_debug_info->global_timestamp =
+				mgmt_rx_reo_get_global_ts(entry->rx_params);
+	cur_frame_debug_info->initial_wait_count = entry->initial_wait_count;
+	cur_frame_debug_info->final_wait_count = entry->wait_count;
+	qdf_mem_copy(cur_frame_debug_info->shared_snapshots,
+		     entry->shared_snapshots,
+		     qdf_min(sizeof(cur_frame_debug_info->shared_snapshots),
+			     sizeof(entry->shared_snapshots)));
+	qdf_mem_copy(cur_frame_debug_info->host_snapshot, entry->host_snapshot,
+		     qdf_min(sizeof(cur_frame_debug_info->host_snapshot),
+			     sizeof(entry->host_snapshot)));
+	cur_frame_debug_info->ingress_timestamp = entry->ingress_timestamp;
+	cur_frame_debug_info->ingress_list_insertion_ts =
+					entry->ingress_list_insertion_ts;
+	cur_frame_debug_info->ingress_list_removal_ts =
+					entry->ingress_list_removal_ts;
+	cur_frame_debug_info->egress_list_insertion_ts =
+					entry->egress_list_insertion_ts;
+	cur_frame_debug_info->scheduled_ts = qdf_get_log_timestamp();
+	cur_frame_debug_info->release_reason = entry->release_reason;
+	cur_frame_debug_info->is_premature_delivery =
+						entry->is_premature_delivery;
+	cur_frame_debug_info->cpu_id = qdf_get_smp_processor_id();
+	cur_frame_debug_info->context = context;
+
+	scheduler_debug_info->next_index++;
+	scheduler_debug_info->next_index %=
+				scheduler_debug_info->frame_list_size;
+	if (scheduler_debug_info->next_index == 0)
+		scheduler_debug_info->wrap_aroud = true;
+
+	return QDF_STATUS_SUCCESS;
+}
+#else
+/**
+ * mgmt_rx_reo_log_scheduler_debug_info() - Log the information about a
+ * frame getting scheduled by mgmt rx reo scheduler
+ * @reo_ctx: management rx reorder context
+ * @entry: Pointer to reorder list entry
+ * @context: Current execution context
+ * @reschedule: Indicates rescheduling
+ *
+ * Return: QDF_STATUS of operation
+ */
+static inline QDF_STATUS
+mgmt_rx_reo_log_scheduler_debug_info(struct mgmt_rx_reo_context *reo_ctx,
+				     struct mgmt_rx_reo_list_entry *entry,
+				     enum mgmt_rx_reo_execution_context context,
+				     bool reschedule)
+{
+	return QDF_STATUS_SUCCESS;
+}
+#endif /* WLAN_MGMT_RX_REO_DEBUG_SUPPORT */
+
 /**
  * mgmt_rx_reo_defer_delivery() - Helper API to check whether a management
  * frame can be delivered in the current context or it has to be scheduled
@@ -2191,25 +2324,55 @@ mgmt_rx_reo_defer_delivery(struct mgmt_rx_reo_list_entry *entry,
 /**
  * mgmt_rx_reo_schedule_delivery() - Helper API to schedule the delivery of
  * a management frames.
+ * @reo_context: Pointer to reorder context
  * @entry: List entry corresponding to the frame which has to be scheduled
  * for delivery
+ * @context: Current execution context
  *
  * Return: QDF_STATUS
  */
 QDF_STATUS
-mgmt_rx_reo_schedule_delivery(struct mgmt_rx_reo_list_entry *entry)
+mgmt_rx_reo_schedule_delivery(struct mgmt_rx_reo_context *reo_context,
+			      struct mgmt_rx_reo_list_entry *entry,
+			      enum mgmt_rx_reo_execution_context context)
 {
 	int scheduled_count;
 	int8_t link_id;
 	uint8_t mlo_grp_id;
 	struct wlan_objmgr_pdev *pdev;
 	QDF_STATUS status;
+	bool reschedule;
+
+	if (!reo_context) {
+		mgmt_rx_reo_err("Reo context is null");
+		return QDF_STATUS_E_NULL_VALUE;
+	}
+
+	if (!entry) {
+		mgmt_rx_reo_err("List entry is null");
+		return QDF_STATUS_E_NULL_VALUE;
+	}
+
+	if (context >= MGMT_RX_REO_CONTEXT_MAX) {
+		mgmt_rx_reo_err("Invalid execution context %d", context);
+		return QDF_STATUS_E_NULL_VALUE;
+	}
 
 	scheduled_count = qdf_atomic_inc_return(&entry->scheduled_count);
 	qdf_assert_always(scheduled_count > 0);
 
-	if (scheduled_count > 1)
+	reschedule = (scheduled_count > 1);
+	status = mgmt_rx_reo_log_scheduler_debug_info(reo_context, entry,
+						      context, reschedule);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		mgmt_rx_reo_err("Failed to log scheduler debug info");
+		return status;
+	}
+
+	if (reschedule) {
+		entry->last_scheduled_ts = qdf_get_log_timestamp();
 		return QDF_STATUS_SUCCESS;
+	}
 
 	link_id = mgmt_rx_reo_get_link_id(entry->rx_params);
 	qdf_assert_always(link_id >= 0 && link_id < MAX_MLO_LINKS);
@@ -2222,6 +2385,7 @@ mgmt_rx_reo_schedule_delivery(struct mgmt_rx_reo_list_entry *entry)
 		return QDF_STATUS_E_NULL_VALUE;
 	}
 
+	entry->first_scheduled_ts = qdf_get_log_timestamp();
 	status = tgt_mgmt_rx_reo_schedule_delivery(wlan_pdev_get_psoc(pdev));
 	if (QDF_IS_STATUS_ERROR(status)) {
 		mgmt_rx_reo_err("Failed to schedule for link %u, group %u",
@@ -5895,6 +6059,56 @@ success:
 	return QDF_STATUS_SUCCESS;
 }
 
+/**
+ * mgmt_rx_reo_scheduler_debug_info_init() - Initialize the management
+ * rx-reorder scheduler debug info
+ * @psoc: Pointer to psoc
+ * @scheduler_debug_info_init_count: Initialization count
+ * @scheduler_debug_info: Scheduler debug info object
+ *
+ * API to initialize the management rx-reorder Scheduler debug info.
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS
+mgmt_rx_reo_scheduler_debug_info_init
+		(struct wlan_objmgr_psoc *psoc,
+		 qdf_atomic_t *scheduler_debug_info_init_count,
+		 struct reo_scheduler_debug_info *scheduler_debug_info)
+{
+	if (!psoc) {
+		mgmt_rx_reo_err("psoc is null");
+		return QDF_STATUS_E_NULL_VALUE;
+	}
+
+	if (!scheduler_debug_info) {
+		mgmt_rx_reo_err("scheduler debug info is null");
+		return QDF_STATUS_E_NULL_VALUE;
+	}
+
+	/* We need to initialize only for the first invocation */
+	if (qdf_atomic_read(scheduler_debug_info_init_count))
+		goto success;
+
+	scheduler_debug_info->frame_list_size =
+		wlan_mgmt_rx_reo_get_scheduler_debug_list_size(psoc);
+
+	if (scheduler_debug_info->frame_list_size) {
+		scheduler_debug_info->frame_list = qdf_mem_malloc
+			(scheduler_debug_info->frame_list_size *
+			 sizeof(*scheduler_debug_info->frame_list));
+
+		if (!scheduler_debug_info->frame_list) {
+			mgmt_rx_reo_err("Failed to allocate debug info");
+			return QDF_STATUS_E_NOMEM;
+		}
+	}
+
+success:
+	qdf_atomic_inc(scheduler_debug_info_init_count);
+	return QDF_STATUS_SUCCESS;
+}
+
 /**
  * mgmt_rx_reo_debug_info_init() - Initialize the management rx-reorder debug
  * info
@@ -5938,6 +6152,14 @@ mgmt_rx_reo_debug_info_init(struct wlan_objmgr_pdev *pdev)
 		return QDF_STATUS_E_FAILURE;
 	}
 
+	status = mgmt_rx_reo_scheduler_debug_info_init
+			(psoc, &reo_context->scheduler_debug_info_init_count,
+			 &reo_context->scheduler_debug_info);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		mgmt_rx_reo_err("Failed to initialize scheduler debug info");
+		return QDF_STATUS_E_FAILURE;
+	}
+
 	return QDF_STATUS_SUCCESS;
 }
 
@@ -6039,6 +6261,52 @@ success:
 	return QDF_STATUS_SUCCESS;
 }
 
+/**
+ * mgmt_rx_reo_scheduler_debug_info_deinit() - De initialize the management
+ * rx-reorder scheduler debug info
+ * @psoc: Pointer to psoc
+ * @scheduler_debug_info_init_count: Initialization count
+ * @scheduler_debug_info: Scheduler debug info object
+ *
+ * API to de initialize the management rx-reorder scheduler debug info.
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS
+mgmt_rx_reo_scheduler_debug_info_deinit
+		(struct wlan_objmgr_psoc *psoc,
+		 qdf_atomic_t *scheduler_debug_info_init_count,
+		 struct reo_scheduler_debug_info *scheduler_debug_info)
+{
+	if (!psoc) {
+		mgmt_rx_reo_err("psoc is null");
+		return QDF_STATUS_E_NULL_VALUE;
+	}
+
+	if (!scheduler_debug_info) {
+		mgmt_rx_reo_err("Scheduler debug info is null");
+		return QDF_STATUS_E_NULL_VALUE;
+	}
+
+	if (!qdf_atomic_read(scheduler_debug_info_init_count)) {
+		mgmt_rx_reo_err("Scheduler debug info ref cnt is 0");
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	/* We need to de-initialize only for the last invocation */
+	if (qdf_atomic_dec_and_test(scheduler_debug_info_init_count))
+		goto success;
+
+	if (scheduler_debug_info->frame_list) {
+		qdf_mem_free(scheduler_debug_info->frame_list);
+		scheduler_debug_info->frame_list = NULL;
+	}
+	scheduler_debug_info->frame_list_size = 0;
+
+success:
+	return QDF_STATUS_SUCCESS;
+}
+
 /**
  * mgmt_rx_reo_debug_info_deinit() - De initialize the management rx-reorder
  * debug info
@@ -6082,6 +6350,14 @@ mgmt_rx_reo_debug_info_deinit(struct wlan_objmgr_pdev *pdev)
 		return QDF_STATUS_E_FAILURE;
 	}
 
+	status = mgmt_rx_reo_scheduler_debug_info_deinit
+			(psoc, &reo_context->scheduler_debug_info_init_count,
+			 &reo_context->scheduler_debug_info);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		mgmt_rx_reo_err("Failed to deinitialize scheduler debug info");
+		return QDF_STATUS_E_FAILURE;
+	}
+
 	return QDF_STATUS_SUCCESS;
 }
 #else

+ 101 - 0
umac/cmn_services/mgmt_txrx/core/src/wlan_mgmt_txrx_rx_reo_i.h

@@ -243,6 +243,23 @@ enum mgmt_rx_reo_list_type {
 	MGMT_RX_REO_LIST_TYPE_INVALID,
 };
 
+/**
+ * enum mgmt_rx_reo_execution_context - Execution contexts related to management
+ * Rx reorder
+ * @MGMT_RX_REO_CONTEXT_MGMT_RX: Incoming mgmt Rx context
+ * @MGMT_RX_REO_CONTEXT_INGRESS_LIST_TIMEOUT: Ingress list time out context
+ * @MGMT_RX_REO_CONTEXT_SCHEDULER_CB: Schgeduler call back context
+ * @MGMT_RX_REO_CONTEXT_MAX: Maximum number of execution contexts
+ * @MGMT_RX_REO_CONTEXT_INVALID: Invalid execution context
+ */
+enum mgmt_rx_reo_execution_context {
+	MGMT_RX_REO_CONTEXT_MGMT_RX,
+	MGMT_RX_REO_CONTEXT_INGRESS_LIST_TIMEOUT,
+	MGMT_RX_REO_CONTEXT_SCHEDULER_CB,
+	MGMT_RX_REO_CONTEXT_MAX,
+	MGMT_RX_REO_CONTEXT_INVALID,
+};
+
 /**
  * struct mgmt_rx_reo_frame_info - This structure holds the information
  * about a management frame.
@@ -329,6 +346,10 @@ struct mgmt_rx_reo_wait_count {
  * the egress list.
  * @egress_list_removal_ts: Host time stamp when this entry is removed from
  * the egress list
+ * @first_scheduled_ts: Host time stamp when this entry is first scheduled
+ * by scheduler
+ * @last_scheduled_ts: Host time stamp when this entry is last scheduled
+ * by scheduler
  * @egress_timestamp: Host time stamp when this frame has exited reorder
  * module
  * @status: Status for this entry
@@ -354,6 +375,8 @@ struct mgmt_rx_reo_list_entry {
 	uint64_t ingress_list_removal_ts;
 	uint64_t egress_list_insertion_ts;
 	uint64_t egress_list_removal_ts;
+	uint64_t first_scheduled_ts;
+	uint64_t last_scheduled_ts;
 	uint64_t egress_timestamp;
 	uint32_t status;
 	struct wlan_objmgr_pdev *pdev;
@@ -751,6 +774,79 @@ struct reo_egress_debug_info {
 	struct reo_egress_frame_stats stats;
 	char boarder[MGMT_RX_REO_EGRESS_FRAME_DEBUG_INFO_BOARDER_MAX_SIZE + 1];
 };
+
+/**
+ * struct reo_scheduler_debug_frame_info - Debug information about a frame
+ * gettign scheduled by management Rx reo scheduler
+ * @is_premature_delivery: Indicates whether the frame is delivered
+ * prematurely
+ * @link_id: link id
+ * @mgmt_pkt_ctr: management packet counter
+ * @global_timestamp: MLO global time stamp
+ * @ingress_timestamp: Host time stamp when the frame enters the reorder module
+ * @ingress_list_insertion_ts: Host time stamp when this entry is inserted to
+ * the ingress list.
+ * @ingress_list_removal_ts: Host time stamp when this entry is removed from
+ * the ingress list
+ * @egress_list_insertion_ts: Host time stamp when this entry is inserted to
+ * the egress list.
+ * @scheduled_ts: Host time stamp when this entry is scheduled for delivery
+ * @initial_wait_count: Wait count when the frame is queued
+ * @final_wait_count: Wait count when frame is released to upper layer
+ * @release_reason: Reason for delivering the frame to upper layers
+ * @shared_snapshots: snapshots shared b/w host and target
+ * @host_snapshot: host snapshot
+ * @cpu_id: CPU index
+ * @context: Execution context
+ */
+struct reo_scheduler_debug_frame_info {
+	bool is_premature_delivery;
+	uint8_t link_id;
+	uint16_t mgmt_pkt_ctr;
+	uint32_t global_timestamp;
+	uint64_t ingress_timestamp;
+	uint64_t ingress_list_insertion_ts;
+	uint64_t ingress_list_removal_ts;
+	uint64_t egress_list_insertion_ts;
+	uint64_t scheduled_ts;
+	struct mgmt_rx_reo_wait_count initial_wait_count;
+	struct mgmt_rx_reo_wait_count final_wait_count;
+	uint8_t release_reason;
+	struct mgmt_rx_reo_snapshot_params shared_snapshots
+			[MAX_MLO_LINKS][MGMT_RX_REO_SHARED_SNAPSHOT_MAX];
+	struct mgmt_rx_reo_snapshot_params host_snapshot[MAX_MLO_LINKS];
+	int cpu_id;
+	enum mgmt_rx_reo_execution_context context;
+};
+
+/**
+ * struct reo_scheduler_stats - Structure to store statistics related to
+ * frames scheduled by reo scheduler
+ * @scheduled_count: Scheduled count
+ * @rescheduled_count: Rescheduled count
+ */
+struct reo_scheduler_stats {
+	uint64_t scheduled_count[MAX_MLO_LINKS];
+	uint64_t rescheduled_count[MAX_MLO_LINKS];
+};
+
+/**
+ * struct reo_scheduler_debug_info - Circular array to store the
+ * debug information about the frames scheduled by reo scheduler
+ * @frame_list: Circular array to store the debug info
+ * @frame_list_size: Size of circular array @frame_list
+ * @next_index: The index at which information about next frame will be logged
+ * @wrap_aroud: Flag to indicate whether wrap around occurred when logging
+ * debug information to @frame_list
+ * @stats: Stats related to scheduler
+ */
+struct reo_scheduler_debug_info {
+	struct reo_scheduler_debug_frame_info *frame_list;
+	uint16_t frame_list_size;
+	int next_index;
+	bool wrap_aroud;
+	struct reo_scheduler_stats stats;
+};
 #endif /* WLAN_MGMT_RX_REO_DEBUG_SUPPORT */
 
 /**
@@ -780,6 +876,9 @@ struct reo_egress_debug_info {
  * @egress_frame_debug_info: Debug object to log outgoing frames
  * @egress_debug_info_init_count: Initialization count of
  * object @egress_frame_debug_info
+ * @scheduler_debug_info_init_count: Initialization count of
+ * object @scheduler_debug_info
+ * @scheduler_debug_info: Debug object to log scheduler debug info
  * @simulation_in_progress: Flag to indicate whether simulation is
  * in progress
  * @mlo_grp_id: MLO Group ID which it belongs to
@@ -797,6 +896,8 @@ struct mgmt_rx_reo_context {
 	struct  reo_ingress_debug_info ingress_frame_debug_info;
 	qdf_atomic_t egress_debug_info_init_count;
 	struct  reo_egress_debug_info egress_frame_debug_info;
+	qdf_atomic_t scheduler_debug_info_init_count;
+	struct  reo_scheduler_debug_info scheduler_debug_info;
 #endif /* WLAN_MGMT_RX_REO_DEBUG_SUPPORT */
 	bool simulation_in_progress;
 	uint8_t mlo_grp_id;

+ 28 - 2
umac/cmn_services/mgmt_txrx/dispatcher/inc/cfg_mgmt_rx_reo.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 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 above
@@ -122,11 +122,37 @@
 		WLAN_MGMT_RX_REO_EGRESS_FRAME_DEBUG_LIST_SIZE_DEFAULT,\
 		CFG_VALUE_OR_CLAMP, "Size of egress frame debug list")
 
+/*
+ * <ini>
+ * mgmt_rx_reo_scheduler_debug_list_size - Size of the list which logs the
+ * frames which are scheduled by management rx reorder scheduler
+ * @Min: 0
+ * @Max: WLAN_MGMT_RX_REO_SCHEDULER_DEBUG_LIST_SIZE_MAX
+ * @Default: WLAN_MGMT_RX_REO_SCHEDULER_DEBUG_LIST_SIZE_DEFAULT
+ *
+ * This ini is used to configure the size of the list which logs the frames
+ * which are scheduled by management rx reorder scheduler
+ *
+ * Related: None
+ *
+ * Supported Feature: MGMT Rx REO
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_MGMT_RX_REO_SCHEDULER_DEBUG_LIST_SIZE CFG_INI_UINT(\
+		"mgmt_rx_reo_scheduler_debug_list_size",\
+		0, WLAN_MGMT_RX_REO_SCHEDULER_DEBUG_LIST_SIZE_MAX,\
+		WLAN_MGMT_RX_REO_SCHEDULER_DEBUG_LIST_SIZE_DEFAULT,\
+		CFG_VALUE_OR_CLAMP, "Size of scheduler debug list")
+
 #define CFG_MGMT_RX_REO_ALL \
 	CFG(CFG_MGMT_RX_REO_ENABLE) \
 	CFG(CFG_MGMT_RX_REO_PKT_CTR_DELTA_THRESH) \
 	CFG(CFG_MGMT_RX_REO_INGRESS_FRAME_DEBUG_LIST_SIZE) \
-	CFG(CFG_MGMT_RX_REO_EGRESS_FRAME_DEBUG_LIST_SIZE)
+	CFG(CFG_MGMT_RX_REO_EGRESS_FRAME_DEBUG_LIST_SIZE) \
+	CFG(CFG_MGMT_RX_REO_SCHEDULER_DEBUG_LIST_SIZE)
 #else
 
 #define CFG_MGMT_RX_REO_ALL

+ 10 - 0
umac/cmn_services/mgmt_txrx/dispatcher/inc/wlan_mgmt_txrx_rx_reo_utils_api.h

@@ -384,6 +384,16 @@ uint16_t
 wlan_mgmt_rx_reo_get_egress_frame_debug_list_size
 					(struct wlan_objmgr_psoc *psoc);
 
+/**
+ * wlan_mgmt_rx_reo_get_scheduler_debug_list_size() - Get the size of
+ * scheduler debug list
+ * @psoc: pointer to psoc object
+ *
+ * Return: Size of scheduler debug list
+ */
+uint16_t
+wlan_mgmt_rx_reo_get_scheduler_debug_list_size(struct wlan_objmgr_psoc *psoc);
+
 /**
  * wlan_mgmt_rx_reo_is_simulation_in_progress() - API to check whether
  * simulation is in progress

+ 11 - 0
umac/cmn_services/mgmt_txrx/dispatcher/src/wlan_mgmt_txrx_rx_reo_utils_api.c

@@ -335,6 +335,17 @@ wlan_mgmt_rx_reo_get_egress_frame_debug_list_size(struct wlan_objmgr_psoc *psoc)
 	return cfg_get(psoc, CFG_MGMT_RX_REO_EGRESS_FRAME_DEBUG_LIST_SIZE);
 }
 
+uint16_t
+wlan_mgmt_rx_reo_get_scheduler_debug_list_size(struct wlan_objmgr_psoc *psoc)
+{
+	if (!psoc) {
+		mgmt_rx_reo_err("psoc is NULL!");
+		return 0;
+	}
+
+	return cfg_get(psoc, CFG_MGMT_RX_REO_SCHEDULER_DEBUG_LIST_SIZE);
+}
+
 #ifndef WLAN_MGMT_RX_REO_SIM_SUPPORT
 bool
 wlan_mgmt_rx_reo_is_feature_enabled_at_psoc(struct wlan_objmgr_psoc *psoc)