* [PATCH v3] ath11k: fix build issues on disabling ATH11K_DEBUG
@ 2019-05-03 5:14 Anilkumar Kolli
2019-05-06 13:03 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Anilkumar Kolli @ 2019-05-03 5:14 UTC (permalink / raw)
To: ath11k
On CONFIG_ATH11K_DEBUG disable fix these build errors
ath11k/dp_rx.c: In function ‘ath11k_htt_pull_ppdu_stats’:
ath11k/dp_rx.c:991:8: error: ‘struct ath11k’ has no member named
‘debug’
if (ar->debug.pktlog_mode == ATH11K_PKTLOG_MODE_LITE) {
^
ath11k/dp_rx.c: In function ‘ath11k_dp_rx_process_mon_status’:
ath11k/dp_rx.c:2278:10: error: ‘struct ath11k’ has no member
named ‘debug’
if (!ar->debug.pktlog_peer_valid) {
^
ath11k/dp_rx.c:2307:9: error: ‘struct ath11k’ has no member named
‘debug’
if (ar->debug.pktlog_peer_valid &&
^
ath11k/dp_rx.c:2308:38: error: ‘struct ath11k’ has no member
named ‘debug’
ether_addr_equal(peer->addr, ar->debug.pktlog_peer_addr)) {
Signed-off-by: Anilkumar Kolli <akolli@codeaurora.org>
---
V2:
- Rebased on top of tree
- changed ath11k_debug_is_pktlog_per_peer_enabled() to
ath11k_debug_is_pktlog_rx_stats_enabled()
drivers/net/wireless/ath/ath11k/debug.h | 31 +++++++++++++++++++++++++++++++
drivers/net/wireless/ath/ath11k/dp_rx.c | 7 +++----
2 files changed, 34 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/debug.h b/drivers/net/wireless/ath/ath11k/debug.h
index 4c1fcca2d8b5..7f62da8d8b8b 100644
--- a/drivers/net/wireless/ath/ath11k/debug.h
+++ b/drivers/net/wireless/ath/ath11k/debug.h
@@ -146,6 +146,22 @@ void ath11k_debug_fw_stats_process(struct ath11k_base *ab, u8 *evt_buf,
int ath11k_dbg_htt_stats_req(struct ath11k *ar,
struct debug_htt_stats_req *stats_req);
+static inline bool ath11k_debug_is_pktlog_lite_mode_enabled(struct ath11k *ar)
+{
+ return (ar->debug.pktlog_mode == ATH11K_PKTLOG_MODE_LITE);
+}
+
+static inline bool ath11k_debug_is_pktlog_rx_stats_enabled(struct ath11k *ar)
+{
+ return (!ar->debug.pktlog_peer_valid && ar->debug.pktlog_mode);
+}
+
+static inline bool ath11k_debug_is_pktlog_peer_vaild(struct ath11k *ar, u8 *addr)
+{
+ return (ar->debug.pktlog_peer_valid && ar->debug.pktlog_mode &&
+ ether_addr_equal(addr, ar->debug.pktlog_peer_addr));
+}
+
static inline int ath11k_debug_is_extd_tx_stats_enabled(struct ath11k *ar)
{
return ar->debug.extd_tx_stats;
@@ -207,6 +223,21 @@ static inline int ath11k_dbg_htt_stats_req(struct ath11k *ar,
{
return 0;
}
+
+static inline bool ath11k_debug_is_pktlog_lite_mode_enabled(struct ath11k *ar)
+{
+ return false;
+}
+
+static inline bool ath11k_debug_is_pktlog_rx_stats_enabled(struct ath11k *ar)
+{
+ return false;
+}
+
+static inline bool ath11k_debug_is_pktlog_peer_vaild(struct ath11k *ar, u8 *addr)
+{
+ return false;
+}
#endif /* CONFIG_ATH11K_DEBUGFS */
#ifdef CONFIG_MAC80211_DEBUGFS
diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c
index 78f7423a66e9..257dd97275d8 100644
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
@@ -988,7 +988,7 @@ static int ath11k_htt_pull_ppdu_stats(struct ath11k_base *ab,
ppdu_id = *((u32 *)data + 1);
ar = ab->pdevs[pdev_id].ar;
- if (ar->debug.pktlog_mode == ATH11K_PKTLOG_MODE_LITE) {
+ if (ath11k_debug_is_pktlog_lite_mode_enabled(ar)) {
/* TODO update the pktlog tracing */
}
@@ -2300,7 +2300,7 @@ int ath11k_dp_rx_process_mon_status(struct ath11k_base *ab, int mac_id,
memset(&ppdu_info, 0, sizeof(ppdu_info));
ppdu_info.peer_id = HAL_INVALID_PEERID;
- if (!ar->debug.pktlog_peer_valid) {
+ if (ath11k_debug_is_pktlog_rx_stats_enabled(ar)) {
/* TODO update the pktlog tracing */
}
@@ -2329,8 +2329,7 @@ int ath11k_dp_rx_process_mon_status(struct ath11k_base *ab, int mac_id,
arsta = (struct ath11k_sta *)peer->sta->drv_priv;
ath11k_dp_rx_update_peer_stats(arsta, &ppdu_info);
- if (ar->debug.pktlog_peer_valid &&
- ether_addr_equal(peer->addr, ar->debug.pktlog_peer_addr)) {
+ if (ath11k_debug_is_pktlog_peer_vaild(ar, peer->addr)) {
/* TODO update the pktlog tracing for one peer*/
}
spin_unlock_bh(&ab->data_lock);
--
1.9.1
_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3] ath11k: fix build issues on disabling ATH11K_DEBUG
2019-05-03 5:14 [PATCH v3] ath11k: fix build issues on disabling ATH11K_DEBUG Anilkumar Kolli
@ 2019-05-06 13:03 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2019-05-06 13:03 UTC (permalink / raw)
To: Anilkumar Kolli; +Cc: ath11k
Anilkumar Kolli <akolli@codeaurora.org> wrote:
> On CONFIG_ATH11K_DEBUG disable fix these build errors
>
> ath11k/dp_rx.c: In function ‘ath11k_htt_pull_ppdu_stats’:
> ath11k/dp_rx.c:991:8: error: ‘struct ath11k’ has no member named
> ‘debug’
> if (ar->debug.pktlog_mode == ATH11K_PKTLOG_MODE_LITE) {
> ^
> ath11k/dp_rx.c: In function ‘ath11k_dp_rx_process_mon_status’:
> ath11k/dp_rx.c:2278:10: error: ‘struct ath11k’ has no member
> named ‘debug’
> if (!ar->debug.pktlog_peer_valid) {
> ^
> ath11k/dp_rx.c:2307:9: error: ‘struct ath11k’ has no member named
> ‘debug’
> if (ar->debug.pktlog_peer_valid &&
> ^
> ath11k/dp_rx.c:2308:38: error: ‘struct ath11k’ has no member
> named ‘debug’
> ether_addr_equal(peer->addr, ar->debug.pktlog_peer_addr)) {
>
> Signed-off-by: Anilkumar Kolli <akolli@codeaurora.org>
Patch applied to ath.git, thanks.
58ee85958c42 ath11k: fix build issues on disabling ATH11K_DEBUG
--
https://patchwork.kernel.org/patch/10927905/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-06 13:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-03 5:14 [PATCH v3] ath11k: fix build issues on disabling ATH11K_DEBUG Anilkumar Kolli
2019-05-06 13:03 ` Kalle Valo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.