qcacmn: Log raw snapshot values
Log raw values of management Rx REO snapshots for debug purposes.
CRs-Fixed: 3242558
Change-Id: Idf30985691226e835190bd3305f29e2d43e654b5
This commit is contained in:

committed by
Madan Koyyalamudi

orang tua
4f6505a158
melakukan
62e885aa1b
@@ -32,10 +32,6 @@
|
||||
#include <wmi_unified_param.h>
|
||||
|
||||
#ifdef WLAN_MGMT_RX_REO_SUPPORT
|
||||
|
||||
#define MGMT_RX_REO_SNAPSHOT_B2B_READ_SWAR_RETRY_LIMIT (11)
|
||||
#define MGMT_RX_REO_SNAPSHOT_READ_RETRY_LIMIT (25)
|
||||
|
||||
/**
|
||||
* target_if_get_mgmt_rx_reo_low_level_ops() - Get low-level ops of management
|
||||
* rx-reorder module
|
||||
|
@@ -249,7 +249,8 @@ target_if_mgmt_rx_reo_read_snapshot_raw
|
||||
(struct mgmt_rx_reo_shared_snapshot *snapshot_address,
|
||||
uint32_t *mgmt_rx_reo_snapshot_low,
|
||||
uint32_t *mgmt_rx_reo_snapshot_high,
|
||||
uint8_t snapshot_version)
|
||||
uint8_t snapshot_version,
|
||||
struct mgmt_rx_reo_shared_snapshot *raw_snapshot)
|
||||
{
|
||||
uint32_t prev_snapshot_low;
|
||||
uint32_t prev_snapshot_high;
|
||||
@@ -262,17 +263,28 @@ target_if_mgmt_rx_reo_read_snapshot_raw
|
||||
snapshot_address->mgmt_rx_reo_snapshot_low;
|
||||
*mgmt_rx_reo_snapshot_high =
|
||||
snapshot_address->mgmt_rx_reo_snapshot_high;
|
||||
raw_snapshot->mgmt_rx_reo_snapshot_low =
|
||||
*mgmt_rx_reo_snapshot_low;
|
||||
raw_snapshot->mgmt_rx_reo_snapshot_high =
|
||||
*mgmt_rx_reo_snapshot_high;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
prev_snapshot_low = snapshot_address->mgmt_rx_reo_snapshot_low;
|
||||
prev_snapshot_high = snapshot_address->mgmt_rx_reo_snapshot_high;
|
||||
raw_snapshot->mgmt_rx_reo_snapshot_low = prev_snapshot_low;
|
||||
raw_snapshot->mgmt_rx_reo_snapshot_high = prev_snapshot_high;
|
||||
|
||||
for (; retry_count < MGMT_RX_REO_SNAPSHOT_B2B_READ_SWAR_RETRY_LIMIT;
|
||||
for (; retry_count < (MGMT_RX_REO_SNAPSHOT_B2B_READ_SWAR_RETRY_LIMIT - 1);
|
||||
retry_count++) {
|
||||
cur_snapshot_low = snapshot_address->mgmt_rx_reo_snapshot_low;
|
||||
cur_snapshot_high = snapshot_address->mgmt_rx_reo_snapshot_high;
|
||||
|
||||
raw_snapshot[retry_count + 1].mgmt_rx_reo_snapshot_low =
|
||||
cur_snapshot_low;
|
||||
raw_snapshot[retry_count + 1].mgmt_rx_reo_snapshot_high =
|
||||
cur_snapshot_high;
|
||||
|
||||
if (prev_snapshot_low == cur_snapshot_low &&
|
||||
prev_snapshot_high == cur_snapshot_high)
|
||||
break;
|
||||
@@ -282,7 +294,7 @@ target_if_mgmt_rx_reo_read_snapshot_raw
|
||||
}
|
||||
|
||||
qdf_assert_always(retry_count !=
|
||||
MGMT_RX_REO_SNAPSHOT_B2B_READ_SWAR_RETRY_LIMIT);
|
||||
(MGMT_RX_REO_SNAPSHOT_B2B_READ_SWAR_RETRY_LIMIT - 1));
|
||||
|
||||
*mgmt_rx_reo_snapshot_low = cur_snapshot_low;
|
||||
*mgmt_rx_reo_snapshot_high = cur_snapshot_high;
|
||||
@@ -306,7 +318,9 @@ target_if_mgmt_rx_reo_read_snapshot(
|
||||
struct wlan_objmgr_pdev *pdev,
|
||||
struct mgmt_rx_reo_snapshot_info *snapshot_info,
|
||||
enum mgmt_rx_reo_shared_snapshot_id id,
|
||||
struct mgmt_rx_reo_snapshot_params *snapshot_value)
|
||||
struct mgmt_rx_reo_snapshot_params *snapshot_value,
|
||||
struct mgmt_rx_reo_shared_snapshot (*raw_snapshot)
|
||||
[MGMT_RX_REO_SNAPSHOT_B2B_READ_SWAR_RETRY_LIMIT])
|
||||
{
|
||||
bool snapshot_valid;
|
||||
uint16_t mgmt_pkt_ctr;
|
||||
@@ -361,7 +375,8 @@ target_if_mgmt_rx_reo_read_snapshot(
|
||||
(snapshot_address,
|
||||
&mgmt_rx_reo_snapshot_low,
|
||||
&mgmt_rx_reo_snapshot_high,
|
||||
snapshot_version);
|
||||
snapshot_version,
|
||||
raw_snapshot[retry_count]);
|
||||
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
mgmt_rx_reo_err("Failed to read snapshot %d",
|
||||
@@ -376,8 +391,16 @@ target_if_mgmt_rx_reo_read_snapshot(
|
||||
if (!snapshot_valid) {
|
||||
mgmt_rx_reo_info("Invalid REO snapshot value");
|
||||
snapshot_value->valid = false;
|
||||
snapshot_value->mgmt_pkt_ctr = 0xFFFE;
|
||||
snapshot_value->global_timestamp = 0xFFFFFFFE;
|
||||
snapshot_value->mgmt_pkt_ctr =
|
||||
low_level_ops->snapshot_get_mgmt_pkt_ctr
|
||||
(mgmt_rx_reo_snapshot_low,
|
||||
snapshot_version);
|
||||
snapshot_value->global_timestamp =
|
||||
low_level_ops->snapshot_get_global_timestamp
|
||||
(mgmt_rx_reo_snapshot_low,
|
||||
mgmt_rx_reo_snapshot_high,
|
||||
snapshot_version);
|
||||
snapshot_value->retry_count = retry_count + 1;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -409,6 +432,7 @@ target_if_mgmt_rx_reo_read_snapshot(
|
||||
snapshot_value->valid = false;
|
||||
snapshot_value->mgmt_pkt_ctr = 0xFFFF;
|
||||
snapshot_value->global_timestamp = 0xFFFFFFFF;
|
||||
snapshot_value->retry_count = retry_count;
|
||||
qdf_assert_always(0);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
@@ -416,6 +440,7 @@ target_if_mgmt_rx_reo_read_snapshot(
|
||||
snapshot_value->valid = true;
|
||||
snapshot_value->mgmt_pkt_ctr = mgmt_pkt_ctr;
|
||||
snapshot_value->global_timestamp = global_timestamp;
|
||||
snapshot_value->retry_count = retry_count + 1;
|
||||
status = QDF_STATUS_SUCCESS;
|
||||
break;
|
||||
|
||||
|
@@ -964,6 +964,7 @@ wlan_mgmt_rx_reo_algo_calculate_wait_count(
|
||||
uint8_t snapshot_id;
|
||||
struct wlan_objmgr_pdev *pdev;
|
||||
struct mgmt_rx_reo_pdev_info *rx_reo_pdev_ctx;
|
||||
struct mgmt_rx_reo_pdev_info *in_frame_rx_reo_pdev_ctx;
|
||||
struct mgmt_rx_reo_snapshot_info *snapshot_info;
|
||||
struct mgmt_rx_reo_snapshot_params snapshot_params
|
||||
[MGMT_RX_REO_SHARED_SNAPSHOT_MAX];
|
||||
@@ -1001,6 +1002,15 @@ wlan_mgmt_rx_reo_algo_calculate_wait_count(
|
||||
qdf_assert_always(in_frame_link < MAX_MLO_LINKS);
|
||||
qdf_assert_always(mgmt_rx_reo_is_valid_link(in_frame_link));
|
||||
|
||||
in_frame_rx_reo_pdev_ctx =
|
||||
wlan_mgmt_rx_reo_get_priv_object(in_frame_pdev);
|
||||
if (!in_frame_rx_reo_pdev_ctx) {
|
||||
mgmt_rx_reo_err("Reo context null for incoming frame pdev");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
qdf_mem_zero(in_frame_rx_reo_pdev_ctx->raw_snapshots,
|
||||
sizeof(in_frame_rx_reo_pdev_ctx->raw_snapshots));
|
||||
|
||||
/* Iterate over all the valid MLO links */
|
||||
for (link = 0; link < MAX_MLO_LINKS; link++) {
|
||||
/* No need wait for any frames on an invalid link */
|
||||
@@ -1021,6 +1031,7 @@ wlan_mgmt_rx_reo_algo_calculate_wait_count(
|
||||
}
|
||||
|
||||
host_ss = &rx_reo_pdev_ctx->host_snapshot;
|
||||
desc->host_snapshot[link] = rx_reo_pdev_ctx->host_snapshot;
|
||||
|
||||
mgmt_rx_reo_info("link_id = %u HOST SS: valid = %u, ctr = %u, ts = %u",
|
||||
link, host_ss->valid, host_ss->mgmt_pkt_ctr,
|
||||
@@ -1038,7 +1049,9 @@ wlan_mgmt_rx_reo_algo_calculate_wait_count(
|
||||
|
||||
status = tgt_mgmt_rx_reo_read_snapshot(
|
||||
pdev, snapshot_info, snapshot_id,
|
||||
&snapshot_params[snapshot_id]);
|
||||
&snapshot_params[snapshot_id],
|
||||
in_frame_rx_reo_pdev_ctx->raw_snapshots
|
||||
[link][snapshot_id]);
|
||||
|
||||
/* Read operation shouldn't fail */
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
|
@@ -101,6 +101,10 @@ struct mgmt_rx_reo_pdev_info {
|
||||
struct mgmt_rx_reo_snapshot_info host_target_shared_snapshot_info
|
||||
[MGMT_RX_REO_SHARED_SNAPSHOT_MAX];
|
||||
struct mgmt_rx_reo_filter filter;
|
||||
struct mgmt_rx_reo_shared_snapshot raw_snapshots[MAX_MLO_LINKS]
|
||||
[MGMT_RX_REO_SHARED_SNAPSHOT_MAX]
|
||||
[MGMT_RX_REO_SNAPSHOT_READ_RETRY_LIMIT]
|
||||
[MGMT_RX_REO_SNAPSHOT_B2B_READ_SWAR_RETRY_LIMIT];
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -41,33 +41,6 @@ enum mgmt_rx_reo_shared_snapshot_id {
|
||||
MGMT_RX_REO_SHARED_SNAPSHOT_INVALID,
|
||||
};
|
||||
|
||||
/*
|
||||
* struct mgmt_rx_reo_snapshot_params - 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_params {
|
||||
bool valid;
|
||||
uint16_t mgmt_pkt_ctr;
|
||||
uint32_t global_timestamp;
|
||||
};
|
||||
|
||||
/*
|
||||
* struct mgmt_rx_reo_snapshot_info - Information related to management Rx
|
||||
* reorder snapshot
|
||||
* @address: Snapshot address
|
||||
* @version: Snapshot version
|
||||
*/
|
||||
struct mgmt_rx_reo_snapshot_info {
|
||||
struct mgmt_rx_reo_shared_snapshot *address;
|
||||
uint8_t version;
|
||||
};
|
||||
|
||||
/*
|
||||
* struct mgmt_rx_reo_shared_snapshot - Represents the management rx-reorder
|
||||
* shared snapshots
|
||||
@@ -93,6 +66,37 @@ struct mgmt_rx_reo_shared_snapshot {
|
||||
};
|
||||
};
|
||||
|
||||
#define MGMT_RX_REO_SNAPSHOT_B2B_READ_SWAR_RETRY_LIMIT (11)
|
||||
#define MGMT_RX_REO_SNAPSHOT_READ_RETRY_LIMIT (25)
|
||||
|
||||
/*
|
||||
* struct mgmt_rx_reo_snapshot_params - 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_params {
|
||||
bool valid;
|
||||
uint16_t mgmt_pkt_ctr;
|
||||
uint32_t global_timestamp;
|
||||
uint8_t retry_count;
|
||||
};
|
||||
|
||||
/*
|
||||
* struct mgmt_rx_reo_snapshot_info - Information related to management Rx
|
||||
* reorder snapshot
|
||||
* @address: Snapshot address
|
||||
* @version: Snapshot version
|
||||
*/
|
||||
struct mgmt_rx_reo_snapshot_info {
|
||||
struct mgmt_rx_reo_shared_snapshot *address;
|
||||
uint8_t version;
|
||||
};
|
||||
|
||||
/*
|
||||
* struct mgmt_rx_reo_params - MGMT Rx REO parameters
|
||||
* @valid: Whether these params are valid
|
||||
|
@@ -114,7 +114,9 @@ tgt_mgmt_rx_reo_read_snapshot(
|
||||
struct wlan_objmgr_pdev *pdev,
|
||||
struct mgmt_rx_reo_snapshot_info *snapshot_info,
|
||||
enum mgmt_rx_reo_shared_snapshot_id id,
|
||||
struct mgmt_rx_reo_snapshot_params *value);
|
||||
struct mgmt_rx_reo_snapshot_params *value,
|
||||
struct mgmt_rx_reo_shared_snapshot (*raw_snapshot)
|
||||
[MGMT_RX_REO_SNAPSHOT_B2B_READ_SWAR_RETRY_LIMIT]);
|
||||
|
||||
/**
|
||||
* tgt_mgmt_rx_reo_fw_consumed_event_handler() - MGMT Rx REO FW consumed
|
||||
|
@@ -71,7 +71,9 @@ tgt_mgmt_rx_reo_read_snapshot(
|
||||
struct wlan_objmgr_pdev *pdev,
|
||||
struct mgmt_rx_reo_snapshot_info *snapshot_info,
|
||||
enum mgmt_rx_reo_shared_snapshot_id id,
|
||||
struct mgmt_rx_reo_snapshot_params *value)
|
||||
struct mgmt_rx_reo_snapshot_params *value,
|
||||
struct mgmt_rx_reo_shared_snapshot (*raw_snapshot)
|
||||
[MGMT_RX_REO_SNAPSHOT_B2B_READ_SWAR_RETRY_LIMIT])
|
||||
{
|
||||
struct wlan_lmac_if_mgmt_rx_reo_tx_ops *mgmt_rx_reo_txops;
|
||||
|
||||
@@ -87,7 +89,8 @@ tgt_mgmt_rx_reo_read_snapshot(
|
||||
}
|
||||
|
||||
return mgmt_rx_reo_txops->read_mgmt_rx_reo_snapshot(pdev, snapshot_info,
|
||||
id, value);
|
||||
id, value,
|
||||
raw_snapshot);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -312,7 +312,9 @@ struct wlan_lmac_if_mgmt_rx_reo_tx_ops {
|
||||
(struct wlan_objmgr_pdev *pdev,
|
||||
struct mgmt_rx_reo_snapshot_info *snapshot_info,
|
||||
enum mgmt_rx_reo_shared_snapshot_id id,
|
||||
struct mgmt_rx_reo_snapshot_params *value);
|
||||
struct mgmt_rx_reo_snapshot_params *value,
|
||||
struct mgmt_rx_reo_shared_snapshot (*raw_snapshot)
|
||||
[MGMT_RX_REO_SNAPSHOT_B2B_READ_SWAR_RETRY_LIMIT]);
|
||||
QDF_STATUS (*get_mgmt_rx_reo_snapshot_info)
|
||||
(struct wlan_objmgr_pdev *pdev,
|
||||
enum mgmt_rx_reo_shared_snapshot_id id,
|
||||
|
Reference in New Issue
Block a user