aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath5k/base.c
diff options
context:
space:
mode:
authorBruno Randolf <br1@einfach.org>2010-09-16 22:37:12 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-09-21 11:05:16 -0400
commitde8af45520f47d14397b603beefae3d2983ce787 (patch)
tree493af409fabc1be554664480847ed280bd06ff6c /drivers/net/wireless/ath/ath5k/base.c
parent234132960dcf8ebd9d424d92a4dfb0e57fa63a17 (diff)
ath5k: Simplify cw_min/max and AIFS configuration
Get rid of overly complicated cw_min/max and AIFS configuration: * Validate values in ath5k_hw_set_tx_queueprops(), so we can use them directly without further checks or computation in ath5k_hw_reset_tx_queue(). * Simplifiy by using AR5K_TUNE_AIFS|CWMIN|CWMAX variables directly since we don't support XR or B channels. That way we can also remove AR5K_TXQ_USEDEFAULT and the confusing logic around it. * Update data types: AIFS is u8, CW's are u16. * Remove now unneeded variables in ath5k_hw. Signed-off-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/base.c')
-rw-r--r--drivers/net/wireless/ath/ath5k/base.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 3e5ed6c0c808..6bd8dd6f327b 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -849,9 +849,11 @@ ath5k_txq_setup(struct ath5k_softc *sc,
849 struct ath5k_txq *txq; 849 struct ath5k_txq *txq;
850 struct ath5k_txq_info qi = { 850 struct ath5k_txq_info qi = {
851 .tqi_subtype = subtype, 851 .tqi_subtype = subtype,
852 .tqi_aifs = AR5K_TXQ_USEDEFAULT, 852 /* XXX: default values not correct for B and XR channels,
853 .tqi_cw_min = AR5K_TXQ_USEDEFAULT, 853 * but who cares? */
854 .tqi_cw_max = AR5K_TXQ_USEDEFAULT 854 .tqi_aifs = AR5K_TUNE_AIFS,
855 .tqi_cw_min = AR5K_TUNE_CWMIN,
856 .tqi_cw_max = AR5K_TUNE_CWMAX
855 }; 857 };
856 int qnum; 858 int qnum;
857 859
@@ -901,9 +903,11 @@ static int
901ath5k_beaconq_setup(struct ath5k_hw *ah) 903ath5k_beaconq_setup(struct ath5k_hw *ah)
902{ 904{
903 struct ath5k_txq_info qi = { 905 struct ath5k_txq_info qi = {
904 .tqi_aifs = AR5K_TXQ_USEDEFAULT, 906 /* XXX: default values not correct for B and XR channels,
905 .tqi_cw_min = AR5K_TXQ_USEDEFAULT, 907 * but who cares? */
906 .tqi_cw_max = AR5K_TXQ_USEDEFAULT, 908 .tqi_aifs = AR5K_TUNE_AIFS,
909 .tqi_cw_min = AR5K_TUNE_CWMIN,
910 .tqi_cw_max = AR5K_TUNE_CWMAX,
907 /* NB: for dynamic turbo, don't enable any other interrupts */ 911 /* NB: for dynamic turbo, don't enable any other interrupts */
908 .tqi_flags = AR5K_TXQ_FLAG_TXDESCINT_ENABLE 912 .tqi_flags = AR5K_TXQ_FLAG_TXDESCINT_ENABLE
909 }; 913 };
@@ -937,7 +941,7 @@ ath5k_beaconq_config(struct ath5k_softc *sc)
937 */ 941 */
938 qi.tqi_aifs = 0; 942 qi.tqi_aifs = 0;
939 qi.tqi_cw_min = 0; 943 qi.tqi_cw_min = 0;
940 qi.tqi_cw_max = 2 * ah->ah_cw_min; 944 qi.tqi_cw_max = 2 * AR5K_TUNE_CWMIN;
941 } 945 }
942 946
943 ATH5K_DBG(sc, ATH5K_DEBUG_BEACON, 947 ATH5K_DBG(sc, ATH5K_DEBUG_BEACON,