diff options
author | Pavel Roskin <proski@gnu.org> | 2011-07-14 20:21:55 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-07-20 15:04:33 -0400 |
commit | e0d687bd9df218ba3d97aac15919d30816d72dcb (patch) | |
tree | 8a1a93dc7f940b4a0900aaa149725b535df17e25 /drivers/net/wireless/ath/ath5k/qcu.c | |
parent | 491735929b63cb665b2215e3183b960e66f221f3 (diff) |
ath5k: merge ath5k_hw and ath5k_softc
Both ath5k_hw and ath5k_softc represent one instance of the hardware.
This duplication is historical and is not needed anymore.
Keep the name "ath5k_hw" for the merged structure and "ah" for the
variable pointing to it. "ath5k_hw" is shorter than "ath5k_softc", more
descriptive and more widely used.
Put the combined structure to ath5k.h where the old ath5k_softc used to
be. Move some code from base.h to ath5k.h as needed.
Remove memory allocation for struct ath5k_hw and the corresponding error
handling. Merge iobase and ah_iobase fields.
Signed-off-by: Pavel Roskin <proski@gnu.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/qcu.c')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/qcu.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath5k/qcu.c b/drivers/net/wireless/ath/ath5k/qcu.c index b18c5021aac3..65f10398999e 100644 --- a/drivers/net/wireless/ath/ath5k/qcu.c +++ b/drivers/net/wireless/ath/ath5k/qcu.c | |||
@@ -187,7 +187,7 @@ int ath5k_hw_setup_tx_queue(struct ath5k_hw *ah, enum ath5k_tx_queue queue_type, | |||
187 | break; | 187 | break; |
188 | case AR5K_TX_QUEUE_XR_DATA: | 188 | case AR5K_TX_QUEUE_XR_DATA: |
189 | if (ah->ah_version != AR5K_AR5212) | 189 | if (ah->ah_version != AR5K_AR5212) |
190 | ATH5K_ERR(ah->ah_sc, | 190 | ATH5K_ERR(ah, |
191 | "XR data queues only supported in" | 191 | "XR data queues only supported in" |
192 | " 5212!\n"); | 192 | " 5212!\n"); |
193 | queue = AR5K_TX_QUEUE_ID_XR_DATA; | 193 | queue = AR5K_TX_QUEUE_ID_XR_DATA; |
@@ -510,7 +510,6 @@ int ath5k_hw_reset_tx_queue(struct ath5k_hw *ah, unsigned int queue) | |||
510 | int ath5k_hw_set_ifs_intervals(struct ath5k_hw *ah, unsigned int slot_time) | 510 | int ath5k_hw_set_ifs_intervals(struct ath5k_hw *ah, unsigned int slot_time) |
511 | { | 511 | { |
512 | struct ieee80211_channel *channel = ah->ah_current_channel; | 512 | struct ieee80211_channel *channel = ah->ah_current_channel; |
513 | struct ath5k_softc *sc = ah->ah_sc; | ||
514 | struct ieee80211_rate *rate; | 513 | struct ieee80211_rate *rate; |
515 | u32 ack_tx_time, eifs, eifs_clock, sifs, sifs_clock; | 514 | u32 ack_tx_time, eifs, eifs_clock, sifs, sifs_clock; |
516 | u32 slot_time_clock = ath5k_hw_htoclock(ah, slot_time); | 515 | u32 slot_time_clock = ath5k_hw_htoclock(ah, slot_time); |
@@ -546,9 +545,9 @@ int ath5k_hw_set_ifs_intervals(struct ath5k_hw *ah, unsigned int slot_time) | |||
546 | * Also we have different lowest rate for 802.11a | 545 | * Also we have different lowest rate for 802.11a |
547 | */ | 546 | */ |
548 | if (channel->hw_value & CHANNEL_5GHZ) | 547 | if (channel->hw_value & CHANNEL_5GHZ) |
549 | rate = &sc->sbands[IEEE80211_BAND_5GHZ].bitrates[0]; | 548 | rate = &ah->sbands[IEEE80211_BAND_5GHZ].bitrates[0]; |
550 | else | 549 | else |
551 | rate = &sc->sbands[IEEE80211_BAND_2GHZ].bitrates[0]; | 550 | rate = &ah->sbands[IEEE80211_BAND_2GHZ].bitrates[0]; |
552 | 551 | ||
553 | ack_tx_time = ath5k_hw_get_frame_duration(ah, 10, rate, false); | 552 | ack_tx_time = ath5k_hw_get_frame_duration(ah, 10, rate, false); |
554 | 553 | ||
@@ -622,7 +621,7 @@ int ath5k_hw_init_queues(struct ath5k_hw *ah) | |||
622 | for (i = 0; i < ah->ah_capabilities.cap_queues.q_tx_num; i++) { | 621 | for (i = 0; i < ah->ah_capabilities.cap_queues.q_tx_num; i++) { |
623 | ret = ath5k_hw_reset_tx_queue(ah, i); | 622 | ret = ath5k_hw_reset_tx_queue(ah, i); |
624 | if (ret) { | 623 | if (ret) { |
625 | ATH5K_ERR(ah->ah_sc, | 624 | ATH5K_ERR(ah, |
626 | "failed to reset TX queue #%d\n", i); | 625 | "failed to reset TX queue #%d\n", i); |
627 | return ret; | 626 | return ret; |
628 | } | 627 | } |