diff options
author | Bruno Randolf <br1@einfach.org> | 2008-03-05 04:35:23 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-03-07 16:07:49 -0500 |
commit | 19fd6e5510f6991148e2210753b58f0eab95e0f6 (patch) | |
tree | 1a71054afbc01d0db5f99fdc50a747eef38d1b54 /drivers/net/wireless/ath5k/debug.c | |
parent | b095d03a7d724db7379b73f64b6035f7be2e0a7c (diff) |
ath5k: struct ath5k_desc cleanups
* make struct ath5k_desc clearer by directly including unions of structures,
which correspond to the hardware descriptors of different HW versions (5210
and 5212). before they were casted at onto ath5k_desc at different points
(e.g. ds_hw[2]).
* rename some structures and variable names to make their use clearer, e.g.
struct ath5k_hw_4w_tx_desc to ath5k_hw_4w_tx_ctl.
* substitute "old" with "5210" and "new" with "5212" (eg. rename
ath5k_hw_proc_new_rx_status() to ath5k_hw_proc_5212_rx_status()) because old
and new are relative and we might have a newer structure at some point.
* unify structs ath5k_hw_old_rx_status and ath5k_hw_new_rx_status into one
ath5k_hw_rx_status, because they only differ in the flags and masks.
drivers/net/wireless/ath5k/ath5k.h: Changes-licensed-under: ISC
drivers/net/wireless/ath5k/debug.c: Changes-licensed-under: GPL
drivers/net/wireless/ath5k/hw.c: Changes-licensed-under: ISC
drivers/net/wireless/ath5k/hw.h: 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.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath5k/debug.c b/drivers/net/wireless/ath5k/debug.c index 05bf4fb8f907..93014944f43f 100644 --- a/drivers/net/wireless/ath5k/debug.c +++ b/drivers/net/wireless/ath5k/debug.c | |||
@@ -500,11 +500,13 @@ static inline void | |||
500 | ath5k_debug_printrxbuf(struct ath5k_buf *bf, int done) | 500 | ath5k_debug_printrxbuf(struct ath5k_buf *bf, int done) |
501 | { | 501 | { |
502 | struct ath5k_desc *ds = bf->desc; | 502 | struct ath5k_desc *ds = bf->desc; |
503 | struct ath5k_hw_all_rx_desc *rd = &ds->ud.ds_rx; | ||
503 | 504 | ||
504 | printk(KERN_DEBUG "R (%p %llx) %08x %08x %08x %08x %08x %08x %c\n", | 505 | printk(KERN_DEBUG "R (%p %llx) %08x %08x %08x %08x %08x %08x %c\n", |
505 | ds, (unsigned long long)bf->daddr, | 506 | ds, (unsigned long long)bf->daddr, |
506 | ds->ds_link, ds->ds_data, ds->ds_ctl0, ds->ds_ctl1, | 507 | ds->ds_link, ds->ds_data, |
507 | ds->ds_hw[0], ds->ds_hw[1], | 508 | 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, | ||
508 | !done ? ' ' : (ds->ds_rxstat.rs_status == 0) ? '*' : '!'); | 510 | !done ? ' ' : (ds->ds_rxstat.rs_status == 0) ? '*' : '!'); |
509 | } | 511 | } |
510 | 512 | ||
@@ -554,14 +556,16 @@ ath5k_debug_printtxbuf(struct ath5k_softc *sc, | |||
554 | struct ath5k_buf *bf, int done) | 556 | struct ath5k_buf *bf, int done) |
555 | { | 557 | { |
556 | struct ath5k_desc *ds = bf->desc; | 558 | struct ath5k_desc *ds = bf->desc; |
559 | struct ath5k_hw_5212_tx_desc *td = &ds->ud.ds_tx5212; | ||
557 | 560 | ||
558 | if (likely(!(sc->debug.level & ATH5K_DEBUG_RESET))) | 561 | if (likely(!(sc->debug.level & ATH5K_DEBUG_RESET))) |
559 | return; | 562 | return; |
560 | 563 | ||
561 | printk(KERN_DEBUG "T (%p %llx) %08x %08x %08x %08x %08x %08x %08x " | 564 | printk(KERN_DEBUG "T (%p %llx) %08x %08x %08x %08x %08x %08x %08x " |
562 | "%08x %c\n", ds, (unsigned long long)bf->daddr, ds->ds_link, | 565 | "%08x %c\n", ds, (unsigned long long)bf->daddr, ds->ds_link, |
563 | ds->ds_data, ds->ds_ctl0, ds->ds_ctl1, | 566 | ds->ds_data, td->tx_ctl.tx_control_0, td->tx_ctl.tx_control_1, |
564 | ds->ds_hw[0], ds->ds_hw[1], ds->ds_hw[2], ds->ds_hw[3], | 567 | 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, | ||
565 | !done ? ' ' : (ds->ds_txstat.ts_status == 0) ? '*' : '!'); | 569 | !done ? ' ' : (ds->ds_txstat.ts_status == 0) ? '*' : '!'); |
566 | } | 570 | } |
567 | 571 | ||