All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath11k: fix build issues on disabling ATH11K_DEBUG
@ 2019-04-23 18:50 Anilkumar Kolli
  2019-05-02 13:25 ` Kalle Valo
  0 siblings, 1 reply; 4+ messages in thread
From: Anilkumar Kolli @ 2019-04-23 18:50 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>
---
 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 66a596ca0c83..4f1084b024a9 100644
--- a/drivers/net/wireless/ath/ath11k/debug.h
+++ b/drivers/net/wireless/ath/ath11k/debug.h
@@ -102,6 +102,22 @@ void ath11k_debug_fw_stats_process(struct ath11k_base *ab, u8 *evt_buf,
 
 void ath11k_debug_fw_stats_init(struct ath11k *ar);
 
+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_per_peer_enabled(struct ath11k *ar)
+{
+	return !!ar->debug.pktlog_peer_valid;
+}
+
+static inline bool ath11k_debug_is_pktlog_peer_vaild(struct ath11k *ar, u8 *addr)
+{
+	return (ar->debug.pktlog_peer_valid &&
+		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;
@@ -157,6 +173,21 @@ static inline int ath11k_debug_is_extd_rx_stats_enabled(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_per_peer_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 4fea82f5b4b6..3b37c36475d2 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 */
 	}
 
@@ -2275,7 +2275,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_per_peer_enabled(ar)) {
 			/* TODO update the pktlog tracing */
 		}
 
@@ -2304,8 +2304,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] 4+ messages in thread

* Re: [PATCH] ath11k: fix build issues on disabling ATH11K_DEBUG
  2019-04-23 18:50 [PATCH] ath11k: fix build issues on disabling ATH11K_DEBUG Anilkumar Kolli
@ 2019-05-02 13:25 ` Kalle Valo
  2019-05-02 14:12   ` Anilkumar Kolli
  0 siblings, 1 reply; 4+ messages in thread
From: Kalle Valo @ 2019-05-02 13:25 UTC (permalink / raw)
  To: Anilkumar Kolli; +Cc: ath11k

Anilkumar Kolli <akolli@codeaurora.org> writes:

> 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>

Failed to apply:

Applying: ath11k: fix build issues on disabling ATH11K_DEBUG
fatal: sha1 information is lacking or useless (drivers/net/wireless/ath/ath11k/dp_rx.c).
error: could not build fake ancestor
Patch failed at 0001 ath11k: fix build issues on disabling ATH11K_DEBUG

Please use ath11k-bringup branch as the baseline so that git can use
3-way merge. Otherwise it will be hard to resolve conflicts.

-- 
Kalle Valo

_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ath11k: fix build issues on disabling ATH11K_DEBUG
  2019-05-02 13:25 ` Kalle Valo
@ 2019-05-02 14:12   ` Anilkumar Kolli
  2019-05-02 14:38     ` Kalle Valo
  0 siblings, 1 reply; 4+ messages in thread
From: Anilkumar Kolli @ 2019-05-02 14:12 UTC (permalink / raw)
  To: Kalle Valo; +Cc: ath11k

On 2019-05-02 18:55, Kalle Valo wrote:
> Anilkumar Kolli <akolli@codeaurora.org> writes:
> 
> Failed to apply:
> 
> Applying: ath11k: fix build issues on disabling ATH11K_DEBUG
> fatal: sha1 information is lacking or useless
> (drivers/net/wireless/ath/ath11k/dp_rx.c).
> error: could not build fake ancestor
> Patch failed at 0001 ath11k: fix build issues on disabling ATH11K_DEBUG
> 
> Please use ath11k-bringup branch as the baseline so that git can use
> 3-way merge. Otherwise it will be hard to resolve conflicts.

Hi Kalle,

Could you please try in this order,
0001-ath11k-move-per-peer-pktlog-entry-to-per-sta-debugfs.patch
0001-ath11k-fix-build-issues-on-disabling-ATH11K_DEBUG.patch

Thanks
Anil.

_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ath11k: fix build issues on disabling ATH11K_DEBUG
  2019-05-02 14:12   ` Anilkumar Kolli
@ 2019-05-02 14:38     ` Kalle Valo
  0 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2019-05-02 14:38 UTC (permalink / raw)
  To: Anilkumar Kolli; +Cc: ath11k

Anilkumar Kolli <akolli@codeaurora.org> writes:

> On 2019-05-02 18:55, Kalle Valo wrote:
>> Anilkumar Kolli <akolli@codeaurora.org> writes:
>>
>> Failed to apply:
>>
>> Applying: ath11k: fix build issues on disabling ATH11K_DEBUG
>> fatal: sha1 information is lacking or useless
>> (drivers/net/wireless/ath/ath11k/dp_rx.c).
>> error: could not build fake ancestor
>> Patch failed at 0001 ath11k: fix build issues on disabling ATH11K_DEBUG
>>
>> Please use ath11k-bringup branch as the baseline so that git can use
>> 3-way merge. Otherwise it will be hard to resolve conflicts.
>
> Hi Kalle,
>
> Could you please try in this order,
> 0001-ath11k-move-per-peer-pktlog-entry-to-per-sta-debugfs.patch
> 0001-ath11k-fix-build-issues-on-disabling-ATH11K_DEBUG.patch

If there are dependencies you should put them in the same patchset,
otherwise there's no guarantee of the order they are applied.

But still this fails to apply, please rebase and resend.

Applying: ath11k: fix build issues on disabling ATH11K_DEBUG
fatal: sha1 information is lacking or useless (drivers/net/wireless/ath/ath11k/dp_rx.c).
error: could not build fake ancestor
Patch failed at 0001 ath11k: fix build issues on disabling ATH11K_DEBUG

-- 
Kalle Valo

_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-05-02 14:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-23 18:50 [PATCH] ath11k: fix build issues on disabling ATH11K_DEBUG Anilkumar Kolli
2019-05-02 13:25 ` Kalle Valo
2019-05-02 14:12   ` Anilkumar Kolli
2019-05-02 14:38     ` 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.