aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath5k/debug.c
diff options
context:
space:
mode:
authorBruno Randolf <bruno@thinktube.com>2008-03-05 04:35:45 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-03-07 16:07:49 -0500
commitb47f407bef0d5349dacf65cd3560a976609d4b45 (patch)
tree894d65eb0d7eb0d0498de342044645f02df0edc7 /drivers/net/wireless/ath5k/debug.c
parent19fd6e5510f6991148e2210753b58f0eab95e0f6 (diff)
ath5k: move rx and tx status structures out of hardware descriptor
move ath5k_tx_status and ath5k_rx_status structures out of the hardware descriptor since they are not accessed by the hardware at all. they just contain converted information from the hardware descriptor. since they are only used in the rx and tx tasklets there is also no use to keep them for each descriptor. drivers/net/wireless/ath5k/ath5k.h: Changes-licensed-under: ISC drivers/net/wireless/ath5k/base.c: Changes-licensed-under: 3-Clause-BSD drivers/net/wireless/ath5k/debug.c: Changes-licensed-under: GPL drivers/net/wireless/ath5k/debug.h: Changes-licensed-under: GPL drivers/net/wireless/ath5k/hw.c: Changes-licensed-under: ISC Signed-off-by: Bruno Randolf <bruno@thinktube.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 */