aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath5k/base.h
diff options
context:
space:
mode:
authorBruno Randolf <br1@einfach.org>2008-07-30 11:12:58 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-08-22 16:29:50 -0400
commit63266a653589e1a237527479f10212ea77ce7844 (patch)
treee2e9318a310d2cc8bec79168c6a3df1f673f27c7 /drivers/net/wireless/ath5k/base.h
parent92ab85354993ac3a364c65cab45745af470ffc67 (diff)
ath5k: rates cleanup
cleanup the rates structures used by ath5k. instead of separate driver and mac80211 rate structures we now setup a static ieee80211_rate array and use it directly. no conversion between two different rate structures has to be done any more. a lot of unused and confusing junk was deleted. renamed ath5k_getchannels into ath5k_setup_bands because this is what it does. rewrote it to copy the bitrates correctly for each band. this is necessary for running different hardware with the same driver (e.g. 5211 and 5212 based cards). add special handling of rates for AR5211 chipsets: it uses different rate codes for CCK rates (which are actually like the other chips but with a 0xF mask). setup a hardware code to rate index reverse mapping table for getting the rate index of received frames. the rates for control frames which have to be set in ath5k_hw_write_rate_duration are now in one single array. 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/base.h: Changes-licensed-under: 3-Clause-BSD drivers/net/wireless/ath5k/hw.c: Changes-licensed-under: ISC Signed-off-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath5k/base.h')
-rw-r--r--drivers/net/wireless/ath5k/base.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath5k/base.h b/drivers/net/wireless/ath5k/base.h
index d7e03e6b8271..248e32eb6cb3 100644
--- a/drivers/net/wireless/ath5k/base.h
+++ b/drivers/net/wireless/ath5k/base.h
@@ -111,17 +111,13 @@ struct ath5k_softc {
111 struct ieee80211_hw *hw; /* IEEE 802.11 common */ 111 struct ieee80211_hw *hw; /* IEEE 802.11 common */
112 struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS]; 112 struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
113 struct ieee80211_channel channels[ATH_CHAN_MAX]; 113 struct ieee80211_channel channels[ATH_CHAN_MAX];
114 struct ieee80211_rate rates[AR5K_MAX_RATES * IEEE80211_NUM_BANDS]; 114 struct ieee80211_rate rates[IEEE80211_NUM_BANDS][AR5K_MAX_RATES];
115 u8 rate_idx[IEEE80211_NUM_BANDS][AR5K_MAX_RATES];
115 enum ieee80211_if_types opmode; 116 enum ieee80211_if_types opmode;
116 struct ath5k_hw *ah; /* Atheros HW */ 117 struct ath5k_hw *ah; /* Atheros HW */
117 118
118 struct ieee80211_supported_band *curband; 119 struct ieee80211_supported_band *curband;
119 120
120 u8 a_rates;
121 u8 b_rates;
122 u8 g_rates;
123 u8 xr_rates;
124
125#ifdef CONFIG_ATH5K_DEBUG 121#ifdef CONFIG_ATH5K_DEBUG
126 struct ath5k_dbg_info debug; /* debug info */ 122 struct ath5k_dbg_info debug; /* debug info */
127#endif /* CONFIG_ATH5K_DEBUG */ 123#endif /* CONFIG_ATH5K_DEBUG */