diff options
author | Bruno Randolf <br1@einfach.org> | 2010-06-16 06:12:12 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-16 14:59:04 -0400 |
commit | 62412a8f0ded6e5741c67c24f9e7c5b2bc33e042 (patch) | |
tree | 9baf56472aaa05be268771401397f542ea649900 /drivers | |
parent | 2847109f73ac1b1e2d7517f9eac7f00c4e60b917 (diff) |
ath5k: remove pointless rx error overlay struct
ath5k_hw_rx_error was only used once, where we could easily just use
ath5k_hw_rx_status as well, so remove it.
Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/debug.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath5k/desc.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath5k/desc.h | 24 |
3 files changed, 9 insertions, 29 deletions
diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c index 02db66e55480..8c638865c712 100644 --- a/drivers/net/wireless/ath/ath5k/debug.c +++ b/drivers/net/wireless/ath/ath5k/debug.c | |||
@@ -925,7 +925,7 @@ ath5k_debug_printrxbuf(struct ath5k_buf *bf, int done, | |||
925 | ds, (unsigned long long)bf->daddr, | 925 | ds, (unsigned long long)bf->daddr, |
926 | ds->ds_link, ds->ds_data, | 926 | ds->ds_link, ds->ds_data, |
927 | rd->rx_ctl.rx_control_0, rd->rx_ctl.rx_control_1, | 927 | rd->rx_ctl.rx_control_0, rd->rx_ctl.rx_control_1, |
928 | rd->u.rx_stat.rx_status_0, rd->u.rx_stat.rx_status_1, | 928 | rd->rx_stat.rx_status_0, rd->rx_stat.rx_status_1, |
929 | !done ? ' ' : (rs->rs_status == 0) ? '*' : '!'); | 929 | !done ? ' ' : (rs->rs_status == 0) ? '*' : '!'); |
930 | } | 930 | } |
931 | 931 | ||
diff --git a/drivers/net/wireless/ath/ath5k/desc.c b/drivers/net/wireless/ath/ath5k/desc.c index 50fc931fd398..eb1427ce6cb5 100644 --- a/drivers/net/wireless/ath/ath5k/desc.c +++ b/drivers/net/wireless/ath/ath5k/desc.c | |||
@@ -510,7 +510,7 @@ static int ath5k_hw_proc_5210_rx_status(struct ath5k_hw *ah, | |||
510 | { | 510 | { |
511 | struct ath5k_hw_rx_status *rx_status; | 511 | struct ath5k_hw_rx_status *rx_status; |
512 | 512 | ||
513 | rx_status = &desc->ud.ds_rx.u.rx_stat; | 513 | rx_status = &desc->ud.ds_rx.rx_stat; |
514 | 514 | ||
515 | /* No frame received / not ready */ | 515 | /* No frame received / not ready */ |
516 | if (unlikely(!(rx_status->rx_status_1 & | 516 | if (unlikely(!(rx_status->rx_status_1 & |
@@ -581,12 +581,8 @@ static int ath5k_hw_proc_5212_rx_status(struct ath5k_hw *ah, | |||
581 | struct ath5k_rx_status *rs) | 581 | struct ath5k_rx_status *rs) |
582 | { | 582 | { |
583 | struct ath5k_hw_rx_status *rx_status; | 583 | struct ath5k_hw_rx_status *rx_status; |
584 | struct ath5k_hw_rx_error *rx_err; | ||
585 | 584 | ||
586 | rx_status = &desc->ud.ds_rx.u.rx_stat; | 585 | rx_status = &desc->ud.ds_rx.rx_stat; |
587 | |||
588 | /* Overlay on error */ | ||
589 | rx_err = &desc->ud.ds_rx.u.rx_err; | ||
590 | 586 | ||
591 | /* No frame received / not ready */ | 587 | /* No frame received / not ready */ |
592 | if (unlikely(!(rx_status->rx_status_1 & | 588 | if (unlikely(!(rx_status->rx_status_1 & |
@@ -632,8 +628,8 @@ static int ath5k_hw_proc_5212_rx_status(struct ath5k_hw *ah, | |||
632 | if (rx_status->rx_status_1 & | 628 | if (rx_status->rx_status_1 & |
633 | AR5K_5212_RX_DESC_STATUS1_PHY_ERROR) { | 629 | AR5K_5212_RX_DESC_STATUS1_PHY_ERROR) { |
634 | rs->rs_status |= AR5K_RXERR_PHY; | 630 | rs->rs_status |= AR5K_RXERR_PHY; |
635 | rs->rs_phyerr |= AR5K_REG_MS(rx_err->rx_error_1, | 631 | rs->rs_phyerr |= AR5K_REG_MS(rx_status->rx_status_1, |
636 | AR5K_RX_DESC_ERROR1_PHY_ERROR_CODE); | 632 | AR5K_5212_RX_DESC_STATUS1_PHY_ERROR_CODE); |
637 | ath5k_ani_phy_error_report(ah, rs->rs_phyerr); | 633 | ath5k_ani_phy_error_report(ah, rs->rs_phyerr); |
638 | } | 634 | } |
639 | 635 | ||
diff --git a/drivers/net/wireless/ath/ath5k/desc.h b/drivers/net/wireless/ath/ath5k/desc.h index 64538fbe4167..45f26446dbff 100644 --- a/drivers/net/wireless/ath/ath5k/desc.h +++ b/drivers/net/wireless/ath/ath5k/desc.h | |||
@@ -96,21 +96,8 @@ struct ath5k_hw_rx_status { | |||
96 | #define AR5K_5212_RX_DESC_STATUS1_RECEIVE_TIMESTAMP 0x7fff0000 | 96 | #define AR5K_5212_RX_DESC_STATUS1_RECEIVE_TIMESTAMP 0x7fff0000 |
97 | #define AR5K_5212_RX_DESC_STATUS1_RECEIVE_TIMESTAMP_S 16 | 97 | #define AR5K_5212_RX_DESC_STATUS1_RECEIVE_TIMESTAMP_S 16 |
98 | #define AR5K_5212_RX_DESC_STATUS1_KEY_CACHE_MISS 0x80000000 | 98 | #define AR5K_5212_RX_DESC_STATUS1_KEY_CACHE_MISS 0x80000000 |
99 | 99 | #define AR5K_5212_RX_DESC_STATUS1_PHY_ERROR_CODE 0x0000ff00 | |
100 | /* | 100 | #define AR5K_5212_RX_DESC_STATUS1_PHY_ERROR_CODE_S 8 |
101 | * common hardware RX error descriptor | ||
102 | */ | ||
103 | struct ath5k_hw_rx_error { | ||
104 | u32 rx_error_0; /* RX status word 0 */ | ||
105 | u32 rx_error_1; /* RX status word 1 */ | ||
106 | } __packed; | ||
107 | |||
108 | /* RX error word 0 fields/flags */ | ||
109 | #define AR5K_RX_DESC_ERROR0 0x00000000 | ||
110 | |||
111 | /* RX error word 1 fields/flags */ | ||
112 | #define AR5K_RX_DESC_ERROR1_PHY_ERROR_CODE 0x0000ff00 | ||
113 | #define AR5K_RX_DESC_ERROR1_PHY_ERROR_CODE_S 8 | ||
114 | 101 | ||
115 | /** | 102 | /** |
116 | * enum ath5k_phy_error_code - PHY Error codes | 103 | * enum ath5k_phy_error_code - PHY Error codes |
@@ -316,11 +303,8 @@ struct ath5k_hw_5212_tx_desc { | |||
316 | * common hardware RX descriptor | 303 | * common hardware RX descriptor |
317 | */ | 304 | */ |
318 | struct ath5k_hw_all_rx_desc { | 305 | struct ath5k_hw_all_rx_desc { |
319 | struct ath5k_hw_rx_ctl rx_ctl; | 306 | struct ath5k_hw_rx_ctl rx_ctl; |
320 | union { | 307 | struct ath5k_hw_rx_status rx_stat; |
321 | struct ath5k_hw_rx_status rx_stat; | ||
322 | struct ath5k_hw_rx_error rx_err; | ||
323 | } u; | ||
324 | } __packed; | 308 | } __packed; |
325 | 309 | ||
326 | /* | 310 | /* |