mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-20 19:03:39 +00:00
192 lines
6.3 KiB
Diff
192 lines
6.3 KiB
Diff
From 9ea5e86b135849595d47ab07aafd2cf50e1973ea Mon Sep 17 00:00:00 2001
|
|
From: Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
|
|
Date: Thu, 2 Mar 2023 12:14:24 +0530
|
|
Subject: [PATCH 3/3] ath12k: add BUG_ONs for debugging purpose
|
|
|
|
WARN_ONs of Mgmt Rx Re-ordering will be treated as BUG_ONs to debug and
|
|
stabilize the code.
|
|
|
|
These BUG_ONs will be removed or reverted back to WARN_ON once after the
|
|
code stabilization.
|
|
|
|
Signed-off-by: Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
|
|
---
|
|
drivers/net/wireless/ath/ath12k/qmi.c | 2 +-
|
|
drivers/net/wireless/ath/ath12k/wmi.c | 38 +++++++++++++--------------
|
|
2 files changed, 20 insertions(+), 20 deletions(-)
|
|
|
|
--- a/drivers/net/wireless/ath/ath12k/qmi.c
|
|
+++ b/drivers/net/wireless/ath/ath12k/qmi.c
|
|
@@ -3868,7 +3868,7 @@ ath12k_mgmt_rx_reo_extract_mlo_glb_rx_re
|
|
cur_link_id = ath12k_mgmt_rx_reo_get_next_valid_link_id(valid_link_bmap,
|
|
prev_link_id);
|
|
|
|
- WARN_ON(!(cur_link_id >= 0));
|
|
+ BUG_ON(!(cur_link_id >= 0));
|
|
|
|
/* Extract per_link_info */
|
|
len = ath12k_mgmt_rx_reo_extract_mlo_glb_rx_reo_per_link_info_tlv(ab,
|
|
--- a/drivers/net/wireless/ath/ath12k/wmi.c
|
|
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
|
|
@@ -8378,7 +8378,7 @@ ath12k_wlan_mgmt_rx_reo_update_host_snap
|
|
|
|
pkt_ctr_delta = ath12k_mgmt_rx_reo_subtract_pkt_ctrs(reo_params->mgmt_pkt_ctr,
|
|
host_ss->mgmt_pkt_ctr);
|
|
- WARN_ON(!(pkt_ctr_delta > 0));
|
|
+ BUG_ON(!(pkt_ctr_delta > 0));
|
|
desc->pkt_ctr_delta = pkt_ctr_delta;
|
|
|
|
if (pkt_ctr_delta == 1)
|
|
@@ -8422,7 +8422,7 @@ failure_debug:
|
|
ath12k_err(ab, "Last frame valid = %u, pkt_ctr = %u, ts =%u\n",
|
|
host_ss->valid, host_ss->mgmt_pkt_ctr,
|
|
host_ss->global_timestamp);
|
|
- WARN_ON(1);
|
|
+ BUG_ON(1);
|
|
|
|
return -EINVAL;
|
|
}
|
|
@@ -8488,7 +8488,7 @@ ath12k_wmi_mgmt_rx_reo_read_snapshot_raw
|
|
prev_snapshot_high = cur_snapshot_high;
|
|
}
|
|
|
|
- WARN_ON(retry_count ==
|
|
+ BUG_ON(retry_count ==
|
|
(ATH12K_MGMT_RX_REO_SNAPSHOT_B2B_READ_SWAR_RETRY_LIMIT - 1));
|
|
|
|
*ath12k_mgmt_rx_reo_snapshot_low = cur_snapshot_low;
|
|
@@ -8510,7 +8510,7 @@ ath12k_mlo_shmem_mgmt_rx_reo_snapshot_va
|
|
if ((snapshot_ver != ATH12K_MGMT_RX_REO_SNAPSHOT_VERSION_TIMESTAMP_REDUNDANCY) &&
|
|
(snapshot_ver != ATH12K_MGMT_RX_REO_SNAPSHOT_VERSION_PKT_CTR_REDUNDANCY)) {
|
|
ath12k_err(ab, "Check this error snapshot ver %d\n", snapshot_ver);
|
|
- WARN_ON(1);
|
|
+ BUG_ON(1);
|
|
}
|
|
|
|
return ATH12K_MLO_SHMEM_GET_BITS(ath12k_mgmt_rx_reo_snapshot_low, 31, 1);
|
|
@@ -8531,7 +8531,7 @@ ath12k_mlo_shmem_mgmt_rx_reo_snapshot_gl
|
|
ATH12K_MLO_SHMEM_GET_BITS(ath12k_mgmt_rx_reo_snapshot_low, 0, 15));
|
|
} else {
|
|
ath12k_err(ab, "Check this error snapshot ver %d\n", snapshot_ver);
|
|
- WARN_ON(1);
|
|
+ BUG_ON(1);
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -8547,7 +8547,7 @@ mlo_shmem_mgmt_rx_reo_snapshot_mgmt_pkt_
|
|
return ATH12K_MLO_SHMEM_GET_BITS(ath12k_mgmt_rx_reo_snapshot_low, 15, 16);
|
|
} else {
|
|
ath12k_err(ab, "Check this error snapshot ver %d\n", snapshot_ver);
|
|
- WARN_ON(1);
|
|
+ BUG_ON(1);
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -8598,7 +8598,7 @@ ath12k_mlo_shmem_mgmt_rx_reo_snapshot_ch
|
|
ATH12K_MLO_SHMEM_GET_BITS(mgmt_pkt_ctr_redundant, 0, 15));
|
|
} else {
|
|
ath12k_err(ab, "Check this error snapshot ver %d\n", snapshot_ver);
|
|
- WARN_ON(1);
|
|
+ BUG_ON(1);
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -8622,7 +8622,7 @@ static u16 ath12k_mgmt_rx_reo_snapshot_g
|
|
return ATH12K_MLO_SHMEM_GET_BITS(mgmt_rx_reo_snapshot_low, 15, 16);
|
|
} else {
|
|
ath12k_err(ab, "Check this error snapshot ver %d\n", snapshot_version);
|
|
- WARN_ON(1);
|
|
+ BUG_ON(1);
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -8743,7 +8743,7 @@ ath12k_wmi_mgmt_rx_reo_read_snapshot(
|
|
if (retry_count == ATH12K_MGMT_RX_REO_SNAPSHOT_READ_RETRY_LIMIT) {
|
|
ath12k_err(ab, "Read retry limit, id = %d, ver = %u\n",
|
|
id, snapshot_version);
|
|
- WARN_ON(1);
|
|
+ BUG_ON(1);
|
|
return -EINVAL;
|
|
}
|
|
|
|
@@ -9328,7 +9328,7 @@ ath12k_wmi_mgmt_rx_reorder_process_calcu
|
|
frames_pending = ath12k_mgmt_rx_reo_subtract_pkt_ctrs(
|
|
mac_hw_ss->mgmt_pkt_ctr,
|
|
host_ss->mgmt_pkt_ctr);
|
|
- WARN_ON(!(frames_pending >= 0));
|
|
+ BUG_ON(!(frames_pending >= 0));
|
|
|
|
if (frames_pending &&
|
|
ath12k_mgmt_rx_reo_compare_global_timestamps_gte
|
|
@@ -9342,7 +9342,7 @@ ath12k_wmi_mgmt_rx_reorder_process_calcu
|
|
* last frame, so try to wait for all of those frames.
|
|
*/
|
|
frames_pending--;
|
|
- WARN_ON(!(frames_pending >= 0));
|
|
+ BUG_ON(!(frames_pending >= 0));
|
|
|
|
if (fw_consumed_ss->valid &&
|
|
ath12k_mgmt_rx_reo_compare_global_timestamps_gte(
|
|
@@ -9367,7 +9367,7 @@ ath12k_wmi_mgmt_rx_reorder_process_calcu
|
|
fw_consumed_ss->mgmt_pkt_ctr,
|
|
host_ss->mgmt_pkt_ctr) - 1;
|
|
|
|
- WARN_ON(!(frames_pending >= 0));
|
|
+ BUG_ON(!(frames_pending >= 0));
|
|
|
|
/**
|
|
* Last frame forwarded to Host has timestamp
|
|
@@ -9422,7 +9422,7 @@ ath12k_wmi_mgmt_rx_reorder_process_calcu
|
|
fw_forwarded_ss->mgmt_pkt_ctr,
|
|
host_ss->mgmt_pkt_ctr) - 1;
|
|
|
|
- WARN_ON(!(delta_fwd_host >= 0));
|
|
+ BUG_ON(!(delta_fwd_host >= 0));
|
|
|
|
/**
|
|
* This will be a better estimate over the one
|
|
@@ -9441,12 +9441,12 @@ ath12k_wmi_mgmt_rx_reorder_process_calcu
|
|
*/
|
|
frames_pending = min(frames_pending,
|
|
delta_fwd_host);
|
|
- WARN_ON(!(frames_pending >= 0));
|
|
+ BUG_ON(!(frames_pending >= 0));
|
|
}
|
|
}
|
|
|
|
update_pending_frames:
|
|
- WARN_ON(!(frames_pending >= 0));
|
|
+ BUG_ON(!(frames_pending >= 0));
|
|
|
|
wait_count->per_link_count[hw_link_id] = frames_pending;
|
|
wait_count->total_count += frames_pending;
|
|
@@ -9732,7 +9732,7 @@ ath12k_mgmt_rx_reo_update_list(
|
|
* then the reordering didn't properly happened please check the
|
|
* reordering
|
|
*/
|
|
- WARN_ON(!(!frame_desc->is_stale || cur_entry->is_parallel_rx));
|
|
+ BUG_ON(!(!frame_desc->is_stale || cur_entry->is_parallel_rx));
|
|
|
|
list_insertion_pos++;
|
|
|
|
@@ -9953,8 +9953,8 @@ ath12k_mgmt_rx_reo_list_entry_send_up(st
|
|
|
|
release_reason = ath12k_mgmt_rx_reo_list_entry_get_release_reason(entry);
|
|
|
|
- //TODO remove WARN_ON once the implementation is stablized
|
|
- WARN_ON(!release_reason != 0);
|
|
+ //TODO remove BUG_ON once the implementation is stablized
|
|
+ BUG_ON(!release_reason != 0);
|
|
|
|
entry->is_delivered = false;
|
|
entry->is_premature_delivery = false;
|
|
@@ -10083,7 +10083,7 @@ ath12k_mgmt_rx_reo_list_release_entries(
|
|
* the last frame released from the reorder list will be
|
|
* discarded at the entry to reorder process itself.
|
|
*/
|
|
- WARN_ON(!first_entry->is_parallel_rx);
|
|
+ BUG_ON(!first_entry->is_parallel_rx);
|
|
}
|
|
|
|
spin_unlock_bh(&reo_list->list_lock);
|