qcacmn: Misc fixes in mgmt Rx REO module

Add fixes in management Rx reorder list handling.

CRs-Fixed: 3081836
Change-Id: Icef1ac3e42dc79e39079093c50b7fae83c4b1fa0
This commit is contained in:
Edayilliam Jayadev
2021-12-08 16:21:00 +05:30
committed by Madan Koyyalamudi
parent 475dd8ff1e
commit 6540534870
3 changed files with 49 additions and 16 deletions

View File

@@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2021, The Linux Foundation. All rights reserved. * Copyright (c) 2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for any * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above * purpose with or without fee is hereby granted, provided that the above
@@ -1534,7 +1535,7 @@ mgmt_rx_reo_update_list(struct mgmt_rx_reo_list *reo_list,
bool *is_queued) bool *is_queued)
{ {
struct mgmt_rx_reo_list_entry *cur_entry; struct mgmt_rx_reo_list_entry *cur_entry;
struct mgmt_rx_reo_list_entry *least_greater_entry; struct mgmt_rx_reo_list_entry *least_greater_entry = NULL;
bool least_greater_entry_found = false; bool least_greater_entry_found = false;
QDF_STATUS status; QDF_STATUS status;
uint32_t new_frame_global_ts; uint32_t new_frame_global_ts;
@@ -1622,26 +1623,37 @@ mgmt_rx_reo_update_list(struct mgmt_rx_reo_list *reo_list,
new_entry->insertion_ts = qdf_get_log_timestamp(); new_entry->insertion_ts = qdf_get_log_timestamp();
new_entry->ingress_timestamp = frame_desc->ingress_timestamp; new_entry->ingress_timestamp = frame_desc->ingress_timestamp;
status = qdf_list_insert_before(&reo_list->list, if (least_greater_entry_found)
&new_entry->node, status = qdf_list_insert_before(
&least_greater_entry->node); &reo_list->list, &new_entry->node,
&least_greater_entry->node);
else
status = qdf_list_insert_back(
&reo_list->list, &new_entry->node);
if (QDF_IS_STATUS_ERROR(status)) if (QDF_IS_STATUS_ERROR(status))
goto error; goto error;
*is_queued = true; *is_queued = true;
} }
cur_entry = least_greater_entry; if (least_greater_entry_found) {
qdf_list_for_each_from(&reo_list->list, cur_entry, node) { cur_entry = least_greater_entry;
uint8_t frame_link_id;
frame_link_id = mgmt_rx_reo_get_link_id(frame_desc->rx_params); qdf_list_for_each_from(&reo_list->list, cur_entry, node) {
if (cur_entry->wait_count.per_link_count[frame_link_id]) { uint8_t frame_link_id;
cur_entry->wait_count.per_link_count[frame_link_id]--; struct mgmt_rx_reo_wait_count *wait_count;
cur_entry->wait_count.total_count--;
if (cur_entry->wait_count.total_count == 0) frame_link_id =
cur_entry->status &= mgmt_rx_reo_get_link_id(frame_desc->rx_params);
~MGMT_RX_REO_STATUS_WAIT_FOR_FRAME_ON_OTHER_LINKS; wait_count = &cur_entry->wait_count;
if (wait_count->per_link_count[frame_link_id]) {
wait_count->per_link_count[frame_link_id]--;
wait_count->total_count--;
if (wait_count->total_count == 0)
cur_entry->status &=
~MGMT_RX_REO_STATUS_WAIT_FOR_FRAME_ON_OTHER_LINKS;
}
} }
} }
@@ -1752,6 +1764,13 @@ wlan_mgmt_rx_reo_update_host_snapshot(struct wlan_objmgr_pdev *pdev,
} }
host_ss = &rx_reo_pdev_ctx->host_snapshot; host_ss = &rx_reo_pdev_ctx->host_snapshot;
/* There should not be any holes in the packet counter */
qdf_assert_always(!host_ss->valid ||
mgmt_rx_reo_subtract_pkt_ctrs(
reo_params->mgmt_pkt_ctr,
host_ss->mgmt_pkt_ctr) == 1);
host_ss->valid = true; host_ss->valid = true;
host_ss->global_timestamp = reo_params->global_timestamp; host_ss->global_timestamp = reo_params->global_timestamp;
host_ss->mgmt_pkt_ctr = reo_params->mgmt_pkt_ctr; host_ss->mgmt_pkt_ctr = reo_params->mgmt_pkt_ctr;

View File

@@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2021, The Linux Foundation. All rights reserved. * Copyright (c) 2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for any * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above * purpose with or without fee is hereby granted, provided that the above
@@ -62,8 +63,18 @@ struct mgmt_rx_reo_snapshot_params {
* @mgmt_rx_reo_snapshot_high: Higher 32 bits of the reo snapshot * @mgmt_rx_reo_snapshot_high: Higher 32 bits of the reo snapshot
*/ */
struct mgmt_rx_reo_snapshot { struct mgmt_rx_reo_snapshot {
uint32_t mgmt_rx_reo_snapshot_low; union {
uint32_t mgmt_rx_reo_snapshot_high; uint32_t mgmt_rx_reo_snapshot_low;
uint32_t valid:1,
mgmt_pkt_ctr:16,
global_timestamp_low:15;
};
union {
uint32_t mgmt_rx_reo_snapshot_high;
uint32_t global_timestamp_high:17,
mgmt_pkt_ctr_redundant:15;
};
}; };
/* /*

View File

@@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2021, The Linux Foundation. All rights reserved. * Copyright (c) 2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for any * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above * purpose with or without fee is hereby granted, provided that the above
@@ -198,6 +199,8 @@ wlan_mgmt_rx_reo_is_feature_enabled_at_psoc(struct wlan_objmgr_psoc *psoc)
return true; return true;
} }
qdf_export_symbol(wlan_mgmt_rx_reo_is_feature_enabled_at_psoc);
bool bool
wlan_mgmt_rx_reo_is_feature_enabled_at_pdev(struct wlan_objmgr_pdev *pdev) wlan_mgmt_rx_reo_is_feature_enabled_at_pdev(struct wlan_objmgr_pdev *pdev)
{ {