mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-07-01 16:27:08 +08:00
58 lines
2.2 KiB
Diff
58 lines
2.2 KiB
Diff
From dca857f07dc14c923a3c47965e771f435807b39c Mon Sep 17 00:00:00 2001
|
|
From: Anilkumar Kolli <quic_akolli@quicinc.com>
|
|
Date: Wed, 19 Jan 2022 20:53:13 +0530
|
|
Subject: [PATCH] ath11k: Fix uninitialized symbol 'rx_buf_sz'
|
|
|
|
Add missing else statement in ath11k_dp_rx_process_mon_status()
|
|
to fix below smatch warnings,
|
|
drivers/net/wireless/ath/ath11k/dp_rx.c:3105
|
|
ath11k_dp_rx_process_mon_status()
|
|
error: uninitialized symbol 'rx_buf_sz'.
|
|
|
|
Fixes: ab18e3bc1c13 ("ath11k: Fix pktlog lite rx events")
|
|
|
|
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
|
|
Signed-off-by: Anilkumar Kolli <quic_akolli@quicinc.com>
|
|
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
|
Link: https://lore.kernel.org/r/1642605793-13518-1-git-send-email-quic_akolli@quicinc.com
|
|
---
|
|
drivers/net/wireless/ath/ath11k/debugfs.h | 1 +
|
|
drivers/net/wireless/ath/ath11k/dp_rx.c | 7 +++++--
|
|
2 files changed, 6 insertions(+), 2 deletions(-)
|
|
|
|
--- a/drivers/net/wireless/ath/ath11k/debugfs.h
|
|
+++ b/drivers/net/wireless/ath/ath11k/debugfs.h
|
|
@@ -88,6 +88,7 @@ enum ath11k_pktlog_mode {
|
|
};
|
|
|
|
enum ath11k_pktlog_enum {
|
|
+ ATH11K_PKTLOG_TYPE_INVALID = 0,
|
|
ATH11K_PKTLOG_TYPE_TX_CTRL = 1,
|
|
ATH11K_PKTLOG_TYPE_TX_STAT = 2,
|
|
ATH11K_PKTLOG_TYPE_TX_MSDU_ID = 3,
|
|
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
|
|
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
|
|
@@ -5054,7 +5054,7 @@ int ath11k_dp_rx_process_mon_status(stru
|
|
struct ath11k_sta *arsta;
|
|
int num_buffs_reaped = 0;
|
|
u32 rx_buf_sz;
|
|
- u16 log_type = 0;
|
|
+ u16 log_type;
|
|
struct ath11k_mon_data *pmon = (struct ath11k_mon_data *)&ar->dp.mon_data;
|
|
struct ath11k_pdev_mon_stats *rx_mon_stats = &pmon->rx_mon_stats;
|
|
struct hal_rx_mon_ppdu_info *ppdu_info = &pmon->mon_ppdu_info;
|
|
@@ -5076,9 +5076,12 @@ int ath11k_dp_rx_process_mon_status(stru
|
|
} else if (ath11k_debugfs_is_pktlog_rx_stats_enabled(ar)) {
|
|
log_type = ATH11K_PKTLOG_TYPE_RX_STATBUF;
|
|
rx_buf_sz = DP_RX_BUFFER_SIZE;
|
|
+ } else {
|
|
+ log_type = ATH11K_PKTLOG_TYPE_INVALID;
|
|
+ rx_buf_sz = 0;
|
|
}
|
|
|
|
- if (log_type)
|
|
+ if (log_type != ATH11K_PKTLOG_TYPE_INVALID)
|
|
trace_ath11k_htt_rxdesc(ar, skb->data, log_type, rx_buf_sz);
|
|
|
|
hal_status = ath11k_hal_rx_parse_mon_status(ab, ppdu_info, skb);
|