|
@@ -26,9 +26,10 @@
|
|
|
#include <qdf_util.h>
|
|
|
#include <wlan_mlo_mgr_cmn.h>
|
|
|
|
|
|
-static struct mgmt_rx_reo_context g_rx_reo_ctx;
|
|
|
+static struct mgmt_rx_reo_context *g_rx_reo_ctx;
|
|
|
|
|
|
-#define mgmt_rx_reo_get_context() (&g_rx_reo_ctx)
|
|
|
+#define mgmt_rx_reo_get_context() (g_rx_reo_ctx)
|
|
|
+#define mgmt_rx_reo_set_context(c) (g_rx_reo_ctx = c)
|
|
|
|
|
|
#define MGMT_RX_REO_PKT_CTR_HALF_RANGE (0x8000)
|
|
|
#define MGMT_RX_REO_PKT_CTR_FULL_RANGE (MGMT_RX_REO_PKT_CTR_HALF_RANGE << 1)
|
|
@@ -1446,6 +1447,20 @@ mgmt_rx_reo_list_display(struct mgmt_rx_reo_list *reo_list)
|
|
|
}
|
|
|
|
|
|
#ifdef WLAN_MGMT_RX_REO_DEBUG_SUPPORT
|
|
|
+/**
|
|
|
+ * mgmt_rx_reo_egress_frame_debug_info_enabled() - API to check whether egress
|
|
|
+ * frame info debug feaure is enabled
|
|
|
+ * @egress_frame_debug_info: Pointer to egress frame debug info object
|
|
|
+ *
|
|
|
+ * Return: true or false
|
|
|
+ */
|
|
|
+static bool
|
|
|
+mgmt_rx_reo_egress_frame_debug_info_enabled
|
|
|
+ (struct reo_egress_debug_info *egress_frame_debug_info)
|
|
|
+{
|
|
|
+ return egress_frame_debug_info->frame_list_size;
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* mgmt_rx_reo_debug_print_egress_frame_stats() - API to print the stats
|
|
|
* related to frames going out of the reorder module
|
|
@@ -1585,11 +1600,20 @@ mgmt_rx_reo_log_egress_frame_before_delivery(
|
|
|
|
|
|
egress_frame_debug_info = &reo_ctx->egress_frame_debug_info;
|
|
|
|
|
|
+ stats = &egress_frame_debug_info->stats;
|
|
|
+ link_id = mgmt_rx_reo_get_link_id(entry->rx_params);
|
|
|
+ stats->delivery_attempts_count[link_id]++;
|
|
|
+ if (entry->is_premature_delivery)
|
|
|
+ stats->premature_delivery_count[link_id]++;
|
|
|
+
|
|
|
+ if (!mgmt_rx_reo_egress_frame_debug_info_enabled
|
|
|
+ (egress_frame_debug_info))
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+
|
|
|
cur_frame_debug_info = &egress_frame_debug_info->frame_list
|
|
|
[egress_frame_debug_info->next_index];
|
|
|
|
|
|
- cur_frame_debug_info->link_id =
|
|
|
- mgmt_rx_reo_get_link_id(entry->rx_params);
|
|
|
+ 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 =
|
|
@@ -1612,12 +1636,6 @@ mgmt_rx_reo_log_egress_frame_before_delivery(
|
|
|
entry->is_premature_delivery;
|
|
|
cur_frame_debug_info->cpu_id = qdf_get_smp_processor_id();
|
|
|
|
|
|
- stats = &egress_frame_debug_info->stats;
|
|
|
- link_id = cur_frame_debug_info->link_id;
|
|
|
- stats->delivery_attempts_count[link_id]++;
|
|
|
- if (entry->is_premature_delivery)
|
|
|
- stats->premature_delivery_count[link_id]++;
|
|
|
-
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
@@ -1633,17 +1651,30 @@ mgmt_rx_reo_log_egress_frame_before_delivery(
|
|
|
static QDF_STATUS
|
|
|
mgmt_rx_reo_log_egress_frame_after_delivery(
|
|
|
struct mgmt_rx_reo_context *reo_ctx,
|
|
|
- struct mgmt_rx_reo_list_entry *entry)
|
|
|
+ struct mgmt_rx_reo_list_entry *entry,
|
|
|
+ uint8_t link_id)
|
|
|
{
|
|
|
struct reo_egress_debug_info *egress_frame_debug_info;
|
|
|
struct reo_egress_debug_frame_info *cur_frame_debug_info;
|
|
|
struct reo_egress_frame_stats *stats;
|
|
|
|
|
|
- if (!reo_ctx)
|
|
|
+ if (!reo_ctx || !entry)
|
|
|
return QDF_STATUS_E_NULL_VALUE;
|
|
|
|
|
|
egress_frame_debug_info = &reo_ctx->egress_frame_debug_info;
|
|
|
|
|
|
+ stats = &egress_frame_debug_info->stats;
|
|
|
+ if (entry->is_delivered) {
|
|
|
+ uint8_t release_reason = entry->release_reason;
|
|
|
+
|
|
|
+ stats->delivery_count[link_id][release_reason]++;
|
|
|
+ stats->delivery_success_count[link_id]++;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!mgmt_rx_reo_egress_frame_debug_info_enabled
|
|
|
+ (egress_frame_debug_info))
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+
|
|
|
cur_frame_debug_info = &egress_frame_debug_info->frame_list
|
|
|
[egress_frame_debug_info->next_index];
|
|
|
|
|
@@ -1653,19 +1684,10 @@ mgmt_rx_reo_log_egress_frame_after_delivery(
|
|
|
|
|
|
egress_frame_debug_info->next_index++;
|
|
|
egress_frame_debug_info->next_index %=
|
|
|
- MGMT_RX_REO_EGRESS_FRAME_DEBUG_ENTRIES_MAX;
|
|
|
+ egress_frame_debug_info->frame_list_size;
|
|
|
if (egress_frame_debug_info->next_index == 0)
|
|
|
egress_frame_debug_info->wrap_aroud = true;
|
|
|
|
|
|
- stats = &egress_frame_debug_info->stats;
|
|
|
- if (entry->is_delivered) {
|
|
|
- uint8_t link_id = cur_frame_debug_info->link_id;
|
|
|
- uint8_t release_reason = cur_frame_debug_info->release_reason;
|
|
|
-
|
|
|
- stats->delivery_count[link_id][release_reason]++;
|
|
|
- stats->delivery_success_count[link_id]++;
|
|
|
- }
|
|
|
-
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
@@ -1697,7 +1719,7 @@ mgmt_rx_reo_debug_print_egress_frame_info(struct mgmt_rx_reo_context *reo_ctx,
|
|
|
egress_frame_debug_info = &reo_ctx->egress_frame_debug_info;
|
|
|
|
|
|
if (egress_frame_debug_info->wrap_aroud)
|
|
|
- num_valid_entries = MGMT_RX_REO_EGRESS_FRAME_DEBUG_ENTRIES_MAX;
|
|
|
+ num_valid_entries = egress_frame_debug_info->frame_list_size;
|
|
|
else
|
|
|
num_valid_entries = egress_frame_debug_info->next_index;
|
|
|
|
|
@@ -1713,11 +1735,11 @@ mgmt_rx_reo_debug_print_egress_frame_info(struct mgmt_rx_reo_context *reo_ctx,
|
|
|
|
|
|
start_index = (egress_frame_debug_info->next_index -
|
|
|
num_entries_to_print +
|
|
|
- MGMT_RX_REO_EGRESS_FRAME_DEBUG_ENTRIES_MAX)
|
|
|
- % MGMT_RX_REO_EGRESS_FRAME_DEBUG_ENTRIES_MAX;
|
|
|
+ egress_frame_debug_info->frame_list_size)
|
|
|
+ % egress_frame_debug_info->frame_list_size;
|
|
|
|
|
|
qdf_assert_always(start_index >= 0 &&
|
|
|
- start_index < MGMT_RX_REO_EGRESS_FRAME_DEBUG_ENTRIES_MAX);
|
|
|
+ start_index < egress_frame_debug_info->frame_list_size);
|
|
|
}
|
|
|
|
|
|
mgmt_rx_reo_alert_no_fl("Egress Frame Info:-");
|
|
@@ -1841,7 +1863,7 @@ mgmt_rx_reo_debug_print_egress_frame_info(struct mgmt_rx_reo_context *reo_ctx,
|
|
|
mgmt_rx_reo_alert_no_fl("%s", boarder);
|
|
|
|
|
|
index++;
|
|
|
- index %= MGMT_RX_REO_EGRESS_FRAME_DEBUG_ENTRIES_MAX;
|
|
|
+ index %= egress_frame_debug_info->frame_list_size;
|
|
|
}
|
|
|
|
|
|
return QDF_STATUS_SUCCESS;
|
|
@@ -2018,7 +2040,8 @@ mgmt_rx_reo_list_entry_send_up(struct mgmt_rx_reo_list *reo_list,
|
|
|
status = QDF_STATUS_SUCCESS;
|
|
|
|
|
|
exit_log:
|
|
|
- temp = mgmt_rx_reo_log_egress_frame_after_delivery(reo_context, entry);
|
|
|
+ temp = mgmt_rx_reo_log_egress_frame_after_delivery(reo_context, entry,
|
|
|
+ link_id);
|
|
|
if (QDF_IS_STATUS_ERROR(temp))
|
|
|
status = temp;
|
|
|
exit:
|
|
@@ -2767,6 +2790,20 @@ failure_debug:
|
|
|
}
|
|
|
|
|
|
#ifdef WLAN_MGMT_RX_REO_DEBUG_SUPPORT
|
|
|
+/**
|
|
|
+ * mgmt_rx_reo_ingress_frame_debug_info_enabled() - API to check whether ingress
|
|
|
+ * frame info debug feaure is enabled
|
|
|
+ * @ingress_frame_debug_info: Pointer to ingress frame debug info object
|
|
|
+ *
|
|
|
+ * Return: true or false
|
|
|
+ */
|
|
|
+static bool
|
|
|
+mgmt_rx_reo_ingress_frame_debug_info_enabled
|
|
|
+ (struct reo_ingress_debug_info *ingress_frame_debug_info)
|
|
|
+{
|
|
|
+ return ingress_frame_debug_info->frame_list_size;
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* mgmt_rx_reo_debug_print_ingress_frame_stats() - API to print the stats
|
|
|
* related to frames going into the reorder module
|
|
@@ -2945,11 +2982,28 @@ mgmt_rx_reo_log_ingress_frame(struct mgmt_rx_reo_context *reo_ctx,
|
|
|
|
|
|
ingress_frame_debug_info = &reo_ctx->ingress_frame_debug_info;
|
|
|
|
|
|
+ stats = &ingress_frame_debug_info->stats;
|
|
|
+ link_id = mgmt_rx_reo_get_link_id(desc->rx_params);
|
|
|
+ stats->ingress_count[link_id][desc->type]++;
|
|
|
+ if (is_queued)
|
|
|
+ stats->queued_count[link_id]++;
|
|
|
+ if (desc->zero_wait_count_rx)
|
|
|
+ stats->zero_wait_count_rx_count[link_id]++;
|
|
|
+ if (desc->immediate_delivery)
|
|
|
+ stats->immediate_delivery_count[link_id]++;
|
|
|
+ if (is_error)
|
|
|
+ stats->error_count[link_id][desc->type]++;
|
|
|
+ if (desc->is_stale)
|
|
|
+ stats->stale_count[link_id][desc->type]++;
|
|
|
+
|
|
|
+ if (!mgmt_rx_reo_ingress_frame_debug_info_enabled
|
|
|
+ (ingress_frame_debug_info))
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+
|
|
|
cur_frame_debug_info = &ingress_frame_debug_info->frame_list
|
|
|
[ingress_frame_debug_info->next_index];
|
|
|
|
|
|
- cur_frame_debug_info->link_id =
|
|
|
- mgmt_rx_reo_get_link_id(desc->rx_params);
|
|
|
+ cur_frame_debug_info->link_id = link_id;
|
|
|
cur_frame_debug_info->mgmt_pkt_ctr =
|
|
|
mgmt_rx_reo_get_pkt_counter(desc->rx_params);
|
|
|
cur_frame_debug_info->global_timestamp =
|
|
@@ -2989,24 +3043,10 @@ mgmt_rx_reo_log_ingress_frame(struct mgmt_rx_reo_context *reo_ctx,
|
|
|
|
|
|
ingress_frame_debug_info->next_index++;
|
|
|
ingress_frame_debug_info->next_index %=
|
|
|
- MGMT_RX_REO_INGRESS_FRAME_DEBUG_ENTRIES_MAX;
|
|
|
+ ingress_frame_debug_info->frame_list_size;
|
|
|
if (ingress_frame_debug_info->next_index == 0)
|
|
|
ingress_frame_debug_info->wrap_aroud = true;
|
|
|
|
|
|
- stats = &ingress_frame_debug_info->stats;
|
|
|
- link_id = cur_frame_debug_info->link_id;
|
|
|
- stats->ingress_count[link_id][desc->type]++;
|
|
|
- if (is_queued)
|
|
|
- stats->queued_count[link_id]++;
|
|
|
- if (desc->zero_wait_count_rx)
|
|
|
- stats->zero_wait_count_rx_count[link_id]++;
|
|
|
- if (desc->immediate_delivery)
|
|
|
- stats->immediate_delivery_count[link_id]++;
|
|
|
- if (is_error)
|
|
|
- stats->error_count[link_id][desc->type]++;
|
|
|
- if (desc->is_stale)
|
|
|
- stats->stale_count[link_id][desc->type]++;
|
|
|
-
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
@@ -3038,7 +3078,7 @@ mgmt_rx_reo_debug_print_ingress_frame_info(struct mgmt_rx_reo_context *reo_ctx,
|
|
|
ingress_frame_debug_info = &reo_ctx->ingress_frame_debug_info;
|
|
|
|
|
|
if (ingress_frame_debug_info->wrap_aroud)
|
|
|
- num_valid_entries = MGMT_RX_REO_INGRESS_FRAME_DEBUG_ENTRIES_MAX;
|
|
|
+ num_valid_entries = ingress_frame_debug_info->frame_list_size;
|
|
|
else
|
|
|
num_valid_entries = ingress_frame_debug_info->next_index;
|
|
|
|
|
@@ -3054,11 +3094,11 @@ mgmt_rx_reo_debug_print_ingress_frame_info(struct mgmt_rx_reo_context *reo_ctx,
|
|
|
|
|
|
start_index = (ingress_frame_debug_info->next_index -
|
|
|
num_entries_to_print +
|
|
|
- MGMT_RX_REO_INGRESS_FRAME_DEBUG_ENTRIES_MAX)
|
|
|
- % MGMT_RX_REO_INGRESS_FRAME_DEBUG_ENTRIES_MAX;
|
|
|
+ ingress_frame_debug_info->frame_list_size)
|
|
|
+ % ingress_frame_debug_info->frame_list_size;
|
|
|
|
|
|
qdf_assert_always(start_index >= 0 &&
|
|
|
- start_index < MGMT_RX_REO_INGRESS_FRAME_DEBUG_ENTRIES_MAX);
|
|
|
+ start_index < ingress_frame_debug_info->frame_list_size);
|
|
|
}
|
|
|
|
|
|
mgmt_rx_reo_alert_no_fl("Ingress Frame Info:-");
|
|
@@ -3203,7 +3243,7 @@ mgmt_rx_reo_debug_print_ingress_frame_info(struct mgmt_rx_reo_context *reo_ctx,
|
|
|
mgmt_rx_reo_alert_no_fl("%s", boarder);
|
|
|
|
|
|
index++;
|
|
|
- index %= MGMT_RX_REO_INGRESS_FRAME_DEBUG_ENTRIES_MAX;
|
|
|
+ index %= ingress_frame_debug_info->frame_list_size;
|
|
|
}
|
|
|
|
|
|
return QDF_STATUS_SUCCESS;
|
|
@@ -4904,6 +4944,318 @@ mgmt_rx_reo_sim_get_snapshot_address(
|
|
|
}
|
|
|
#endif /* WLAN_MGMT_RX_REO_SIM_SUPPORT */
|
|
|
|
|
|
+#ifdef WLAN_MGMT_RX_REO_DEBUG_SUPPORT
|
|
|
+/**
|
|
|
+ * mgmt_rx_reo_ingress_debug_info_init() - Initialize the management rx-reorder
|
|
|
+ * ingress frame debug info
|
|
|
+ * @psoc: Pointer to psoc
|
|
|
+ * @ingress_debug_info_init_count: Initialization count
|
|
|
+ * @ingress_frame_debug_info: Ingress frame debug info object
|
|
|
+ *
|
|
|
+ * API to initialize the management rx-reorder ingress frame debug info.
|
|
|
+ *
|
|
|
+ * Return: QDF_STATUS
|
|
|
+ */
|
|
|
+static QDF_STATUS
|
|
|
+mgmt_rx_reo_ingress_debug_info_init
|
|
|
+ (struct wlan_objmgr_psoc *psoc,
|
|
|
+ qdf_atomic_t *ingress_debug_info_init_count,
|
|
|
+ struct reo_ingress_debug_info *ingress_frame_debug_info)
|
|
|
+{
|
|
|
+ if (!psoc) {
|
|
|
+ mgmt_rx_reo_err("psoc is null");
|
|
|
+ return QDF_STATUS_E_NULL_VALUE;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!ingress_frame_debug_info) {
|
|
|
+ mgmt_rx_reo_err("Ingress frame debug info is null");
|
|
|
+ return QDF_STATUS_E_NULL_VALUE;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* We need to initialize only for the first invocation */
|
|
|
+ if (qdf_atomic_read(ingress_debug_info_init_count))
|
|
|
+ goto success;
|
|
|
+
|
|
|
+ ingress_frame_debug_info->frame_list_size =
|
|
|
+ wlan_mgmt_rx_reo_get_ingress_frame_debug_list_size(psoc);
|
|
|
+
|
|
|
+ if (ingress_frame_debug_info->frame_list_size) {
|
|
|
+ ingress_frame_debug_info->frame_list = qdf_mem_malloc
|
|
|
+ (ingress_frame_debug_info->frame_list_size *
|
|
|
+ sizeof(*ingress_frame_debug_info->frame_list));
|
|
|
+
|
|
|
+ if (!ingress_frame_debug_info->frame_list) {
|
|
|
+ mgmt_rx_reo_err("Failed to allocate debug info");
|
|
|
+ return QDF_STATUS_E_NOMEM;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /* Initialize the string for storing the debug info table boarder */
|
|
|
+ qdf_mem_set(ingress_frame_debug_info->boarder,
|
|
|
+ MGMT_RX_REO_INGRESS_FRAME_DEBUG_INFO_BOARDER_MAX_SIZE, '-');
|
|
|
+
|
|
|
+success:
|
|
|
+ qdf_atomic_inc(ingress_debug_info_init_count);
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * mgmt_rx_reo_egress_debug_info_init() - Initialize the management rx-reorder
|
|
|
+ * egress frame debug info
|
|
|
+ * @psoc: Pointer to psoc
|
|
|
+ * @egress_debug_info_init_count: Initialization count
|
|
|
+ * @egress_frame_debug_info: Egress frame debug info object
|
|
|
+ *
|
|
|
+ * API to initialize the management rx-reorder egress frame debug info.
|
|
|
+ *
|
|
|
+ * Return: QDF_STATUS
|
|
|
+ */
|
|
|
+static QDF_STATUS
|
|
|
+mgmt_rx_reo_egress_debug_info_init
|
|
|
+ (struct wlan_objmgr_psoc *psoc,
|
|
|
+ qdf_atomic_t *egress_debug_info_init_count,
|
|
|
+ struct reo_egress_debug_info *egress_frame_debug_info)
|
|
|
+{
|
|
|
+ if (!psoc) {
|
|
|
+ mgmt_rx_reo_err("psoc is null");
|
|
|
+ return QDF_STATUS_E_NULL_VALUE;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!egress_frame_debug_info) {
|
|
|
+ mgmt_rx_reo_err("Egress frame debug info is null");
|
|
|
+ return QDF_STATUS_E_NULL_VALUE;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* We need to initialize only for the first invocation */
|
|
|
+ if (qdf_atomic_read(egress_debug_info_init_count))
|
|
|
+ goto success;
|
|
|
+
|
|
|
+ egress_frame_debug_info->frame_list_size =
|
|
|
+ wlan_mgmt_rx_reo_get_egress_frame_debug_list_size(psoc);
|
|
|
+
|
|
|
+ if (egress_frame_debug_info->frame_list_size) {
|
|
|
+ egress_frame_debug_info->frame_list = qdf_mem_malloc
|
|
|
+ (egress_frame_debug_info->frame_list_size *
|
|
|
+ sizeof(*egress_frame_debug_info->frame_list));
|
|
|
+
|
|
|
+ if (!egress_frame_debug_info->frame_list) {
|
|
|
+ mgmt_rx_reo_err("Failed to allocate debug info");
|
|
|
+ return QDF_STATUS_E_NOMEM;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /* Initialize the string for storing the debug info table boarder */
|
|
|
+ qdf_mem_set(egress_frame_debug_info->boarder,
|
|
|
+ MGMT_RX_REO_EGRESS_FRAME_DEBUG_INFO_BOARDER_MAX_SIZE, '-');
|
|
|
+
|
|
|
+success:
|
|
|
+ qdf_atomic_inc(egress_debug_info_init_count);
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * mgmt_rx_reo_debug_info_init() - Initialize the management rx-reorder debug
|
|
|
+ * info
|
|
|
+ * @pdev: pointer to pdev object
|
|
|
+ *
|
|
|
+ * API to initialize the management rx-reorder debug info.
|
|
|
+ *
|
|
|
+ * Return: QDF_STATUS
|
|
|
+ */
|
|
|
+static QDF_STATUS
|
|
|
+mgmt_rx_reo_debug_info_init(struct wlan_objmgr_pdev *pdev)
|
|
|
+{
|
|
|
+ struct mgmt_rx_reo_context *reo_context;
|
|
|
+ QDF_STATUS status;
|
|
|
+ struct wlan_objmgr_psoc *psoc;
|
|
|
+
|
|
|
+ psoc = wlan_pdev_get_psoc(pdev);
|
|
|
+
|
|
|
+ if (!wlan_mgmt_rx_reo_is_feature_enabled_at_psoc(psoc))
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+
|
|
|
+ reo_context = mgmt_rx_reo_get_context();
|
|
|
+ if (!reo_context) {
|
|
|
+ mgmt_rx_reo_err("reo context is null");
|
|
|
+ return QDF_STATUS_E_NULL_VALUE;
|
|
|
+ }
|
|
|
+
|
|
|
+ status = mgmt_rx_reo_ingress_debug_info_init
|
|
|
+ (psoc, &reo_context->ingress_debug_info_init_count,
|
|
|
+ &reo_context->ingress_frame_debug_info);
|
|
|
+ if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
+ mgmt_rx_reo_err("Failed to initialize ingress debug info");
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
+ }
|
|
|
+
|
|
|
+ status = mgmt_rx_reo_egress_debug_info_init
|
|
|
+ (psoc, &reo_context->egress_debug_info_init_count,
|
|
|
+ &reo_context->egress_frame_debug_info);
|
|
|
+ if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
+ mgmt_rx_reo_err("Failed to initialize egress debug info");
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
+ }
|
|
|
+
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * mgmt_rx_reo_ingress_debug_info_deinit() - De initialize the management
|
|
|
+ * rx-reorder ingress frame debug info
|
|
|
+ * @psoc: Pointer to psoc
|
|
|
+ * @ingress_debug_info_init_count: Initialization count
|
|
|
+ * @ingress_frame_debug_info: Ingress frame debug info object
|
|
|
+ *
|
|
|
+ * API to de initialize the management rx-reorder ingress frame debug info.
|
|
|
+ *
|
|
|
+ * Return: QDF_STATUS
|
|
|
+ */
|
|
|
+static QDF_STATUS
|
|
|
+mgmt_rx_reo_ingress_debug_info_deinit
|
|
|
+ (struct wlan_objmgr_psoc *psoc,
|
|
|
+ qdf_atomic_t *ingress_debug_info_init_count,
|
|
|
+ struct reo_ingress_debug_info *ingress_frame_debug_info)
|
|
|
+{
|
|
|
+ if (!psoc) {
|
|
|
+ mgmt_rx_reo_err("psoc is null");
|
|
|
+ return QDF_STATUS_E_NULL_VALUE;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!ingress_frame_debug_info) {
|
|
|
+ mgmt_rx_reo_err("Ingress frame debug info is null");
|
|
|
+ return QDF_STATUS_E_NULL_VALUE;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!qdf_atomic_read(ingress_debug_info_init_count)) {
|
|
|
+ mgmt_rx_reo_err("Ingress 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(ingress_debug_info_init_count))
|
|
|
+ goto success;
|
|
|
+
|
|
|
+ if (ingress_frame_debug_info->frame_list) {
|
|
|
+ qdf_mem_free(ingress_frame_debug_info->frame_list);
|
|
|
+ ingress_frame_debug_info->frame_list = NULL;
|
|
|
+ }
|
|
|
+ ingress_frame_debug_info->frame_list_size = 0;
|
|
|
+
|
|
|
+ qdf_mem_zero(ingress_frame_debug_info->boarder,
|
|
|
+ MGMT_RX_REO_INGRESS_FRAME_DEBUG_INFO_BOARDER_MAX_SIZE + 1);
|
|
|
+
|
|
|
+success:
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * mgmt_rx_reo_egress_debug_info_deinit() - De initialize the management
|
|
|
+ * rx-reorder egress frame debug info
|
|
|
+ * @psoc: Pointer to psoc
|
|
|
+ * @egress_debug_info_init_count: Initialization count
|
|
|
+ * @egress_frame_debug_info: Egress frame debug info object
|
|
|
+ *
|
|
|
+ * API to de initialize the management rx-reorder egress frame debug info.
|
|
|
+ *
|
|
|
+ * Return: QDF_STATUS
|
|
|
+ */
|
|
|
+static QDF_STATUS
|
|
|
+mgmt_rx_reo_egress_debug_info_deinit
|
|
|
+ (struct wlan_objmgr_psoc *psoc,
|
|
|
+ qdf_atomic_t *egress_debug_info_init_count,
|
|
|
+ struct reo_egress_debug_info *egress_frame_debug_info)
|
|
|
+{
|
|
|
+ if (!psoc) {
|
|
|
+ mgmt_rx_reo_err("psoc is null");
|
|
|
+ return QDF_STATUS_E_NULL_VALUE;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!egress_frame_debug_info) {
|
|
|
+ mgmt_rx_reo_err("Egress frame debug info is null");
|
|
|
+ return QDF_STATUS_E_NULL_VALUE;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!qdf_atomic_read(egress_debug_info_init_count)) {
|
|
|
+ mgmt_rx_reo_err("Egress 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(egress_debug_info_init_count))
|
|
|
+ goto success;
|
|
|
+
|
|
|
+ if (egress_frame_debug_info->frame_list) {
|
|
|
+ qdf_mem_free(egress_frame_debug_info->frame_list);
|
|
|
+ egress_frame_debug_info->frame_list = NULL;
|
|
|
+ }
|
|
|
+ egress_frame_debug_info->frame_list_size = 0;
|
|
|
+
|
|
|
+ qdf_mem_zero(egress_frame_debug_info->boarder,
|
|
|
+ MGMT_RX_REO_EGRESS_FRAME_DEBUG_INFO_BOARDER_MAX_SIZE + 1);
|
|
|
+
|
|
|
+success:
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * mgmt_rx_reo_debug_info_deinit() - De initialize the management rx-reorder
|
|
|
+ * debug info
|
|
|
+ * @pdev: Pointer to pdev object
|
|
|
+ *
|
|
|
+ * API to de initialize the management rx-reorder debug info.
|
|
|
+ *
|
|
|
+ * Return: QDF_STATUS
|
|
|
+ */
|
|
|
+static QDF_STATUS
|
|
|
+mgmt_rx_reo_debug_info_deinit(struct wlan_objmgr_pdev *pdev)
|
|
|
+{
|
|
|
+ struct mgmt_rx_reo_context *reo_context;
|
|
|
+ QDF_STATUS status;
|
|
|
+ struct wlan_objmgr_psoc *psoc;
|
|
|
+
|
|
|
+ psoc = wlan_pdev_get_psoc(pdev);
|
|
|
+
|
|
|
+ if (!wlan_mgmt_rx_reo_is_feature_enabled_at_psoc(psoc))
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+
|
|
|
+ reo_context = mgmt_rx_reo_get_context();
|
|
|
+ if (!reo_context) {
|
|
|
+ mgmt_rx_reo_err("reo context is null");
|
|
|
+ return QDF_STATUS_E_NULL_VALUE;
|
|
|
+ }
|
|
|
+
|
|
|
+ status = mgmt_rx_reo_ingress_debug_info_deinit
|
|
|
+ (psoc, &reo_context->ingress_debug_info_init_count,
|
|
|
+ &reo_context->ingress_frame_debug_info);
|
|
|
+ if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
+ mgmt_rx_reo_err("Failed to deinitialize ingress debug info");
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
+ }
|
|
|
+
|
|
|
+ status = mgmt_rx_reo_egress_debug_info_deinit
|
|
|
+ (psoc, &reo_context->egress_debug_info_init_count,
|
|
|
+ &reo_context->egress_frame_debug_info);
|
|
|
+ if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
+ mgmt_rx_reo_err("Failed to deinitialize egress debug info");
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
+ }
|
|
|
+
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+}
|
|
|
+#else
|
|
|
+static QDF_STATUS
|
|
|
+mgmt_rx_reo_debug_info_init(struct wlan_objmgr_psoc *psoc)
|
|
|
+{
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+}
|
|
|
+
|
|
|
+static QDF_STATUS
|
|
|
+mgmt_rx_reo_debug_info_deinit(struct wlan_objmgr_psoc *psoc)
|
|
|
+{
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+}
|
|
|
+#endif /* WLAN_MGMT_RX_REO_DEBUG_SUPPORT */
|
|
|
+
|
|
|
/**
|
|
|
* mgmt_rx_reo_flush_reorder_list() - Flush all entries in the reorder list
|
|
|
* @reo_list: Pointer to reorder list
|
|
@@ -4992,15 +5344,19 @@ mgmt_rx_reo_deinit_context(void)
|
|
|
status = mgmt_rx_reo_sim_deinit(reo_context);
|
|
|
if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
mgmt_rx_reo_err("Failed to de initialize reo sim context");
|
|
|
+ qdf_mem_free(reo_context);
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
|
|
|
status = mgmt_rx_reo_list_deinit(&reo_context->reo_list);
|
|
|
if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
mgmt_rx_reo_err("Failed to de-initialize mgmt Rx reo list");
|
|
|
+ qdf_mem_free(reo_context);
|
|
|
return status;
|
|
|
}
|
|
|
|
|
|
+ qdf_mem_free(reo_context);
|
|
|
+
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
@@ -5011,12 +5367,12 @@ mgmt_rx_reo_init_context(void)
|
|
|
QDF_STATUS temp;
|
|
|
struct mgmt_rx_reo_context *reo_context;
|
|
|
|
|
|
- reo_context = mgmt_rx_reo_get_context();
|
|
|
+ reo_context = qdf_mem_malloc(sizeof(*reo_context));
|
|
|
if (!reo_context) {
|
|
|
- mgmt_rx_reo_err("reo context is null");
|
|
|
+ mgmt_rx_reo_err("Failed to allocate reo context");
|
|
|
return QDF_STATUS_E_NULL_VALUE;
|
|
|
}
|
|
|
- qdf_mem_zero(reo_context, sizeof(*reo_context));
|
|
|
+ mgmt_rx_reo_set_context(reo_context);
|
|
|
|
|
|
status = mgmt_rx_reo_list_init(&reo_context->reo_list);
|
|
|
if (QDF_IS_STATUS_ERROR(status)) {
|
|
@@ -5035,11 +5391,6 @@ mgmt_rx_reo_init_context(void)
|
|
|
qdf_timer_mod(&reo_context->reo_list.ageout_timer,
|
|
|
MGMT_RX_REO_AGEOUT_TIMER_PERIOD_MS);
|
|
|
|
|
|
- qdf_mem_set(reo_context->ingress_frame_debug_info.boarder,
|
|
|
- MGMT_RX_REO_INGRESS_FRAME_DEBUG_INFO_BOARDER_MAX_SIZE, '-');
|
|
|
- qdf_mem_set(reo_context->egress_frame_debug_info.boarder,
|
|
|
- MGMT_RX_REO_EGRESS_FRAME_DEBUG_INFO_BOARDER_MAX_SIZE, '-');
|
|
|
-
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
|
|
|
error_reo_list_deinit:
|
|
@@ -5318,6 +5669,13 @@ mgmt_rx_reo_pdev_obj_create_notification(
|
|
|
|
|
|
mgmt_txrx_pdev_ctx->mgmt_rx_reo_pdev_ctx = mgmt_rx_reo_pdev_ctx;
|
|
|
|
|
|
+ status = mgmt_rx_reo_debug_info_init(pdev);
|
|
|
+ if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
+ mgmt_rx_reo_err("Failed to initialize debug info");
|
|
|
+ status = QDF_STATUS_E_NOMEM;
|
|
|
+ goto failure;
|
|
|
+ }
|
|
|
+
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
|
|
|
failure:
|
|
@@ -5339,6 +5697,12 @@ mgmt_rx_reo_pdev_obj_destroy_notification(
|
|
|
if (!wlan_mgmt_rx_reo_is_feature_enabled_at_pdev(pdev))
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
|
|
|
+ status = mgmt_rx_reo_debug_info_deinit(pdev);
|
|
|
+ if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
+ mgmt_rx_reo_err("Failed to de-initialize debug info");
|
|
|
+ return status;
|
|
|
+ }
|
|
|
+
|
|
|
qdf_mem_free(mgmt_txrx_pdev_ctx->mgmt_rx_reo_pdev_ctx);
|
|
|
mgmt_txrx_pdev_ctx->mgmt_rx_reo_pdev_ctx = NULL;
|
|
|
|
|
@@ -5351,6 +5715,18 @@ mgmt_rx_reo_pdev_obj_destroy_notification(
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
+QDF_STATUS
|
|
|
+mgmt_rx_reo_psoc_obj_create_notification(struct wlan_objmgr_psoc *psoc)
|
|
|
+{
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+}
|
|
|
+
|
|
|
+QDF_STATUS
|
|
|
+mgmt_rx_reo_psoc_obj_destroy_notification(struct wlan_objmgr_psoc *psoc)
|
|
|
+{
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+}
|
|
|
+
|
|
|
bool
|
|
|
mgmt_rx_reo_is_simulation_in_progress(void)
|
|
|
{
|