ath10k: Add more details to some debug messages.
PATCH v2 1/4 ath10k: Add more details to some debug messages.
From: Ben Greear <[email protected]>
--- drivers/net/wireless/ath/ath10k/mac.c | 3 ++- drivers/net/wireless/ath/ath10k/txrx.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath10k/mac.c +2 -1
@@ -3418,7 +3418,8 @@ static void ath10k_flush(struct ieee80211_hw *hw, u32 queues, bool drop) }), ATH10K_FLUSH_TIMEOUT_HZ);if (ret <=0 || skip) -ath10k_warn ("tx not flushed\n" ); +ath10k_warn ("tx not flushed, ret: %i skip: %i ar-state: %i\n" , + ret, skip, ar->state); skip:mutex_unlock (&ar->conf_mutex);
drivers/net/wireless/ath/ath10k/txrx.c +2 -1
@@ -378,7 +378,8 @@ void ath10k_peer_unmap_event(struct ath10k_htt *htt,spin_lock_bh (&ar->data_lock); peer =ath10k_peer_find_by_id (ar, ev->peer_id);if (!peer) { -ath10k_warn ("unknown peer id %d\n" , ev->peer_id); +ath10k_warn ("peer-unmap-event: unknown peer id %d\n" , + ev->peer_id); goto exit; }
Signature · 7 lines
1.7.11.7 _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
PATCH v2 2/4 ath10k: Print out size of wmi-ready-event message.
From: Ben Greear <[email protected]>
Show message length and expected length. Helps debug firmware mismatch issues.
--- drivers/net/wireless/ath/ath10k/wmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath10k/wmi.c +2 -2
@@ -2071,11 +2071,11 @@ static int ath10k_wmi_ready_event_rx(struct ath10k *ar, struct sk_buff *skb)memcpy (ar->mac_addr, ev->mac_addr.addr,ETH_ALEN );ath10k_dbg (ATH10K_DBG_WMI , -"wmi event ready sw_version %u abi_version %u mac_addr %pM status %d\n" , +"wmi event ready sw_version %u abi_version %u mac_addr %pM status %d skb->len %i ev-sz %zu\n" ,__le32_to_cpu (ev->sw_version),__le32_to_cpu (ev->abi_version), ev->mac_addr.addr, -__le32_to_cpu (ev->status)); +__le32_to_cpu (ev->status), skb->len,sizeof (*ev));complete (&ar->wmi.unified_ready);return 0 ;
Signature · 7 lines
1.7.11.7 _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
PATCH v2 3/4 ath10k: Add more debugging for receive errors.
In reply to [email protected]From: Ben Greear <[email protected]>
--- drivers/net/wireless/ath/ath10k/htt_rx.c | 11 +++++++++++ drivers/net/wireless/ath/ath10k/txrx.c | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath10k/htt_rx.c +11 -0
@@ -937,6 +937,8 @@ static void ath10k_htt_rx_handler(struct ath10k_htt *htt, }if (ath10k_htt_rx_has_decrypt_err (msdu_head)) { +ath10k_dbg (ATH10K_DBG_HTT , +"htt rx dropping due to decrypt-err\n" );ath10k_htt_rx_free_msdu_chain (msdu_head);continue ; }
@@ -975,6 +977,15 @@ static void ath10k_htt_rx_handler(struct ath10k_htt *htt, info.skb = msdu_head; info.fcs_err =ath10k_htt_rx_has_fcs_err (msdu_head); info.mic_err =ath10k_htt_rx_has_mic_err (msdu_head); + +if (info.fcs_err) +ath10k_dbg (ATH10K_DBG_HTT , +"htt rx has FCS err\n" ); + +if (info.mic_err) +ath10k_dbg (ATH10K_DBG_HTT , +"htt rx has MIC err\n" ); + info.signal =ATH10K_DEFAULT_NOISE_FLOOR ; info.signal += rx->ppdu.combined_rssi;
drivers/net/wireless/ath/ath10k/txrx.c +2 -2
@@ -259,7 +259,7 @@ void ath10k_process_rx(struct ath10k *ar, struct htt_rx_info *info) status->freq = ch->center_freq; ath10k_dbg(ATH10K_DBG_DATA, - "rx skb %p len %u %s%s%s%s%s %srate_idx %u vht_nss %u freq %u band %u\n", + "rx skb %p len %u %s%s%s%s%s %srate_idx %u vht_nss %u freq %u band %u flag 0x%x fcs-err %i\n", info->skb, info->skb->len, status->flag == 0 ? "legacy" : "",
@@ -271,7 +271,7 @@ void ath10k_process_rx(struct ath10k *ar, struct htt_rx_info *info) status->rate_idx, status->vht_nss, status->freq, - status->band); + status->band, status->flag, info->fcs_err);ath10k_dbg_dump (ATH10K_DBG_HTT_DUMP ,NULL ,"rx skb: " , info->skb->data, info->skb->len);
Signature · 7 lines
1.7.11.7 _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
PATCH v2 4/4 ath10k: Better tx/rx debugging.
In reply to [email protected]From: Ben Greear <[email protected]>
Make it easier to grep for htt rx errors.
--- drivers/net/wireless/ath/ath10k/htt_rx.c | 17 ++++++++++------- drivers/net/wireless/ath/ath10k/htt_tx.c | 4 ++-- 2 files changed, 12 insertions(+), 9 deletions(-)
drivers/net/wireless/ath/ath10k/htt_rx.c +10 -7
@@ -324,7 +324,7 @@ static int ath10k_htt_rx_amsdu_pop(struct ath10k_htt *htt, msdu->len +skb_tailroom (msdu), DMA_FROM_DEVICE); -ath10k_dbg_dump (ATH10K_DBG_HTT_DUMP ,NULL ,"htt rx: " , +ath10k_dbg_dump (ATH10K_DBG_HTT_DUMP ,NULL ,"htt rx pop: " , msdu->data, msdu->len +skb_tailroom (msdu)); rx_desc = (struct htt_rx_desc *)msdu->data;
@@ -417,8 +417,8 @@ static int ath10k_htt_rx_amsdu_pop(struct ath10k_htt *htt, next->len +skb_tailroom (next), DMA_FROM_DEVICE); -ath10k_dbg_dump (ATH10K_DBG_HTT_DUMP ,NULL ,"htt rx: " , - next->data, +ath10k_dbg_dump (ATH10K_DBG_HTT_DUMP ,NULL , +"htt rx chained: " , next->data, next->len +skb_tailroom (next));skb_trim (next,0 );
@@ -751,7 +751,7 @@ static void ath10k_htt_rx_msdu(struct ath10k_htt *htt, struct htt_rx_info *info)/* This shouldn't happen. If it does than it may be a FW bug. */ if (skb->next) { -ath10k_warn ("received chained non A-MSDU frame\n" ); +ath10k_warn ("htt rx received chained non A-MSDU frame\n" );ath10k_htt_rx_free_msdu_chain (skb->next); skb->next =NULL ; }
@@ -947,6 +947,7 @@ static void ath10k_htt_rx_handler(struct ath10k_htt *htt,/* Skip mgmt frames while we handle this in WMI */ if (status ==HTT_RX_IND_MPDU_STATUS_MGMT_CTRL ) { +ath10k_dbg (ATH10K_DBG_HTT ,"htt rx mgmt ctrl\n" );ath10k_htt_rx_free_msdu_chain (msdu_head);continue ; }
@@ -962,6 +963,8 @@ static void ath10k_htt_rx_handler(struct ath10k_htt *htt, }if (test_bit (ATH10K_CAC_RUNNING , &htt->ar->dev_flags)) { +ath10k_dbg (ATH10K_DBG_HTT , +"htt rx CAC running\n" );ath10k_htt_rx_free_msdu_chain (msdu_head);continue ; }
@@ -969,7 +972,7 @@ static void ath10k_htt_rx_handler(struct ath10k_htt *htt,/* FIXME: we do not support chaining yet. * this needs investigation */ if (msdu_chaining) { -ath10k_warn ("msdu_chaining is true\n" ); +ath10k_warn ("htt rx msdu_chaining is true\n" );ath10k_htt_rx_free_msdu_chain (msdu_head);continue ; }
@@ -1106,7 +1109,7 @@ static void ath10k_htt_rx_frag_handler(struct ath10k_htt *htt,skb_trim (info.skb, info.skb->len - trim); -ath10k_dbg_dump (ATH10K_DBG_HTT_DUMP ,NULL ,"htt frag mpdu: " , +ath10k_dbg_dump (ATH10K_DBG_HTT_DUMP ,NULL ,"htt rx frag mpdu: " , info.skb->data, info.skb->len);ath10k_process_rx (htt->ar, &info);
@@ -1127,7 +1130,7 @@ void ath10k_htt_t2h_msg_handler(struct ath10k *ar, struct sk_buff *skb)if (!IS_ALIGNED ((unsigned long )skb->data,4 ))ath10k_warn ("unaligned htt message, expect trouble\n" ); -ath10k_dbg (ATH10K_DBG_HTT ,"HTT RX, msg_type: 0x%0X\n" , +ath10k_dbg (ATH10K_DBG_HTT ,"htt rx, msg_type: 0x%0X\n" , resp->hdr.msg_type);switch (resp->hdr.msg_type) {case HTT_T2H_MSG_TYPE_VERSION_CONF : {
drivers/net/wireless/ath/ath10k/htt_tx.c +2 -2
@@ -460,9 +460,9 @@ int ath10k_htt_tx(struct ath10k_htt *htt, struct sk_buff *msdu) DMA_TO_DEVICE); } -ath10k_dbg (ATH10K_DBG_HTT ,"msdu 0x%llx\n" , +ath10k_dbg (ATH10K_DBG_HTT ,"tx-msdu 0x%llx\n" , (unsigned long long )ATH10K_SKB_CB (msdu)->paddr); -ath10k_dbg_dump (ATH10K_DBG_HTT_DUMP ,NULL ,"msdu: " , +ath10k_dbg_dump (ATH10K_DBG_HTT_DUMP ,NULL ,"tx-msdu: " , msdu->data, msdu->len);skb_put (txdesc, desc_len);
Signature · 7 lines
1.7.11.7 _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
Quoted 3 lines · [email protected] writes:
From: Ben Greear <[email protected]>
---
No s-o-b tag.
Also I would prefer style like this for patch titles (especially without the double space after the colon):
ath10k: add more details to some debug messages
And thirdly :) please also CC linux-wireless for wider review audience
drivers/net/wireless/ath/ath10k/mac.c static void ath10k_flush(struct ieee80211_hw *hw, u32 queues, bool drop) · line 3422
Quoted 9 lines
drivers/net/wireless/ath/ath10k/mac.c +2
-1@@ -3418,7 +3418,8 @@ static void ath10k_flush(struct ieee80211_hw *hw, u32 queues, bool drop) }), ATH10K_FLUSH_TIMEOUT_HZ);if (ret <=0 || skip) -ath10k_warn ("tx not flushed\n" ); +ath10k_warn ("tx not flushed, ret: %i skip: %i ar-state: %i\n" , + ret, skip, ar->state);
I'm trying to keep warning and debug messages clean, maybe this is a bit more readable:
"tx not flushed: %i (skip %i ar-state %i)\n"
Or another option:
"tx not flushed (skip %i ar-state %i): %i\n"
I would go for the latter.
Signature · 6 lines
Kalle Valo _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
Quoted 1 line · [email protected] writes:
From: Ben Greear <[email protected]>
Patches 2-4 applied, patch 1 dropped.
Signature · 6 lines
Kalle Valo _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k