aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath5k/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath5k/debug.c')
-rw-r--r--drivers/net/wireless/ath5k/debug.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath5k/debug.c b/drivers/net/wireless/ath5k/debug.c
index 93014944f43f..d3eb9e88c84d 100644
--- a/drivers/net/wireless/ath5k/debug.c
+++ b/drivers/net/wireless/ath5k/debug.c
@@ -497,7 +497,8 @@ ath5k_debug_dump_bands(struct ath5k_softc *sc)
497} 497}
498 498
499static inline void 499static inline void
500ath5k_debug_printrxbuf(struct ath5k_buf *bf, int done) 500ath5k_debug_printrxbuf(struct ath5k_buf *bf, int done,
501 struct ath5k_rx_status *rs)
501{ 502{
502 struct ath5k_desc *ds = bf->desc; 503 struct ath5k_desc *ds = bf->desc;
503 struct ath5k_hw_all_rx_desc *rd = &ds->ud.ds_rx; 504 struct ath5k_hw_all_rx_desc *rd = &ds->ud.ds_rx;
@@ -507,7 +508,7 @@ ath5k_debug_printrxbuf(struct ath5k_buf *bf, int done)
507 ds->ds_link, ds->ds_data, 508 ds->ds_link, ds->ds_data,
508 rd->rx_ctl.rx_control_0, rd->rx_ctl.rx_control_1, 509 rd->rx_ctl.rx_control_0, rd->rx_ctl.rx_control_1,
509 rd->u.rx_stat.rx_status_0, rd->u.rx_stat.rx_status_0, 510 rd->u.rx_stat.rx_status_0, rd->u.rx_stat.rx_status_0,
510 !done ? ' ' : (ds->ds_rxstat.rs_status == 0) ? '*' : '!'); 511 !done ? ' ' : (rs->rs_status == 0) ? '*' : '!');
511} 512}
512 513
513void 514void
@@ -515,6 +516,7 @@ ath5k_debug_printrxbuffs(struct ath5k_softc *sc, struct ath5k_hw *ah)
515{ 516{
516 struct ath5k_desc *ds; 517 struct ath5k_desc *ds;
517 struct ath5k_buf *bf; 518 struct ath5k_buf *bf;
519 struct ath5k_rx_status rs = {};
518 int status; 520 int status;
519 521
520 if (likely(!(sc->debug.level & ATH5K_DEBUG_RESET))) 522 if (likely(!(sc->debug.level & ATH5K_DEBUG_RESET)))
@@ -526,9 +528,9 @@ ath5k_debug_printrxbuffs(struct ath5k_softc *sc, struct ath5k_hw *ah)
526 spin_lock_bh(&sc->rxbuflock); 528 spin_lock_bh(&sc->rxbuflock);
527 list_for_each_entry(bf, &sc->rxbuf, list) { 529 list_for_each_entry(bf, &sc->rxbuf, list) {
528 ds = bf->desc; 530 ds = bf->desc;
529 status = ah->ah_proc_rx_desc(ah, ds); 531 status = ah->ah_proc_rx_desc(ah, ds, &rs);
530 if (!status) 532 if (!status)
531 ath5k_debug_printrxbuf(bf, status == 0); 533 ath5k_debug_printrxbuf(bf, status == 0, &rs);
532 } 534 }
533 spin_unlock_bh(&sc->rxbuflock); 535 spin_unlock_bh(&sc->rxbuflock);
534} 536}
@@ -552,21 +554,24 @@ ath5k_debug_dump_skb(struct ath5k_softc *sc,
552} 554}
553 555
554void 556void
555ath5k_debug_printtxbuf(struct ath5k_softc *sc, 557ath5k_debug_printtxbuf(struct ath5k_softc *sc, struct ath5k_buf *bf)
556 struct ath5k_buf *bf, int done)
557{ 558{
558 struct ath5k_desc *ds = bf->desc; 559 struct ath5k_desc *ds = bf->desc;
559 struct ath5k_hw_5212_tx_desc *td = &ds->ud.ds_tx5212; 560 struct ath5k_hw_5212_tx_desc *td = &ds->ud.ds_tx5212;
561 struct ath5k_tx_status ts = {};
562 int done;
560 563
561 if (likely(!(sc->debug.level & ATH5K_DEBUG_RESET))) 564 if (likely(!(sc->debug.level & ATH5K_DEBUG_RESET)))
562 return; 565 return;
563 566
567 done = sc->ah->ah_proc_tx_desc(sc->ah, bf->desc, &ts);
568
564 printk(KERN_DEBUG "T (%p %llx) %08x %08x %08x %08x %08x %08x %08x " 569 printk(KERN_DEBUG "T (%p %llx) %08x %08x %08x %08x %08x %08x %08x "
565 "%08x %c\n", ds, (unsigned long long)bf->daddr, ds->ds_link, 570 "%08x %c\n", ds, (unsigned long long)bf->daddr, ds->ds_link,
566 ds->ds_data, td->tx_ctl.tx_control_0, td->tx_ctl.tx_control_1, 571 ds->ds_data, td->tx_ctl.tx_control_0, td->tx_ctl.tx_control_1,
567 td->tx_ctl.tx_control_2, td->tx_ctl.tx_control_3, 572 td->tx_ctl.tx_control_2, td->tx_ctl.tx_control_3,
568 td->tx_stat.tx_status_0, td->tx_stat.tx_status_1, 573 td->tx_stat.tx_status_0, td->tx_stat.tx_status_1,
569 !done ? ' ' : (ds->ds_txstat.ts_status == 0) ? '*' : '!'); 574 done ? ' ' : (ts.ts_status == 0) ? '*' : '!');
570} 575}
571 576
572#endif /* ifdef CONFIG_ATH5K_DEBUG */ 577#endif /* ifdef CONFIG_ATH5K_DEBUG */