diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/net/wireless/ath/ath9k/rc.h | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/rc.h')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/rc.h | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/drivers/net/wireless/ath/ath9k/rc.h b/drivers/net/wireless/ath/ath9k/rc.h index fa21a628ddd0..4f6d6fd442f4 100644 --- a/drivers/net/wireless/ath/ath9k/rc.h +++ b/drivers/net/wireless/ath/ath9k/rc.h | |||
@@ -19,6 +19,8 @@ | |||
19 | #ifndef RC_H | 19 | #ifndef RC_H |
20 | #define RC_H | 20 | #define RC_H |
21 | 21 | ||
22 | #include "hw.h" | ||
23 | |||
22 | struct ath_softc; | 24 | struct ath_softc; |
23 | 25 | ||
24 | #define ATH_RATE_MAX 30 | 26 | #define ATH_RATE_MAX 30 |
@@ -55,6 +57,10 @@ enum { | |||
55 | || (_phy == WLAN_RC_PHY_HT_40_DS) \ | 57 | || (_phy == WLAN_RC_PHY_HT_40_DS) \ |
56 | || (_phy == WLAN_RC_PHY_HT_20_DS_HGI) \ | 58 | || (_phy == WLAN_RC_PHY_HT_20_DS_HGI) \ |
57 | || (_phy == WLAN_RC_PHY_HT_40_DS_HGI)) | 59 | || (_phy == WLAN_RC_PHY_HT_40_DS_HGI)) |
60 | #define WLAN_RC_PHY_20(_phy) ((_phy == WLAN_RC_PHY_HT_20_SS) \ | ||
61 | || (_phy == WLAN_RC_PHY_HT_20_DS) \ | ||
62 | || (_phy == WLAN_RC_PHY_HT_20_SS_HGI) \ | ||
63 | || (_phy == WLAN_RC_PHY_HT_20_DS_HGI)) | ||
58 | #define WLAN_RC_PHY_40(_phy) ((_phy == WLAN_RC_PHY_HT_40_SS) \ | 64 | #define WLAN_RC_PHY_40(_phy) ((_phy == WLAN_RC_PHY_HT_40_SS) \ |
59 | || (_phy == WLAN_RC_PHY_HT_40_DS) \ | 65 | || (_phy == WLAN_RC_PHY_HT_40_DS) \ |
60 | || (_phy == WLAN_RC_PHY_HT_40_SS_HGI) \ | 66 | || (_phy == WLAN_RC_PHY_HT_40_SS_HGI) \ |
@@ -102,6 +108,7 @@ enum { | |||
102 | */ | 108 | */ |
103 | struct ath_rate_table { | 109 | struct ath_rate_table { |
104 | int rate_cnt; | 110 | int rate_cnt; |
111 | int mcs_start; | ||
105 | struct { | 112 | struct { |
106 | int valid; | 113 | int valid; |
107 | int valid_single_stream; | 114 | int valid_single_stream; |
@@ -109,14 +116,12 @@ struct ath_rate_table { | |||
109 | u32 ratekbps; | 116 | u32 ratekbps; |
110 | u32 user_ratekbps; | 117 | u32 user_ratekbps; |
111 | u8 ratecode; | 118 | u8 ratecode; |
112 | u8 short_preamble; | ||
113 | u8 dot11rate; | 119 | u8 dot11rate; |
114 | u8 ctrl_rate; | 120 | u8 ctrl_rate; |
115 | u8 base_index; | 121 | u8 base_index; |
116 | u8 cw40index; | 122 | u8 cw40index; |
117 | u8 sgi_index; | 123 | u8 sgi_index; |
118 | u8 ht_index; | 124 | u8 ht_index; |
119 | u32 max_4ms_framelen; | ||
120 | } info[RATE_TABLE_SIZE]; | 125 | } info[RATE_TABLE_SIZE]; |
121 | u32 probe_interval; | 126 | u32 probe_interval; |
122 | u8 initial_ratemax; | 127 | u8 initial_ratemax; |
@@ -165,26 +170,18 @@ struct ath_rate_priv { | |||
165 | struct ath_rate_softc *asc; | 170 | struct ath_rate_softc *asc; |
166 | }; | 171 | }; |
167 | 172 | ||
173 | #define ATH_TX_INFO_FRAME_TYPE_INTERNAL (1 << 0) | ||
174 | #define ATH_TX_INFO_FRAME_TYPE_PAUSE (1 << 1) | ||
175 | #define ATH_TX_INFO_UPDATE_RC (1 << 2) | ||
176 | #define ATH_TX_INFO_XRETRY (1 << 3) | ||
177 | #define ATH_TX_INFO_UNDERRUN (1 << 4) | ||
178 | |||
168 | enum ath9k_internal_frame_type { | 179 | enum ath9k_internal_frame_type { |
169 | ATH9K_NOT_INTERNAL, | 180 | ATH9K_NOT_INTERNAL, |
170 | ATH9K_INT_PAUSE, | 181 | ATH9K_INT_PAUSE, |
171 | ATH9K_INT_UNPAUSE | 182 | ATH9K_INT_UNPAUSE |
172 | }; | 183 | }; |
173 | 184 | ||
174 | struct ath_tx_info_priv { | ||
175 | struct ath_wiphy *aphy; | ||
176 | struct ath_tx_status tx; | ||
177 | int n_frames; | ||
178 | int n_bad_frames; | ||
179 | bool update_rc; | ||
180 | enum ath9k_internal_frame_type frame_type; | ||
181 | }; | ||
182 | |||
183 | #define ATH_TX_INFO_PRIV(tx_info) \ | ||
184 | ((struct ath_tx_info_priv *)((tx_info)->rate_driver_data[0])) | ||
185 | |||
186 | void ath_rate_attach(struct ath_softc *sc); | ||
187 | u8 ath_rate_findrateix(struct ath_softc *sc, u8 dot11_rate); | ||
188 | int ath_rate_control_register(void); | 185 | int ath_rate_control_register(void); |
189 | void ath_rate_control_unregister(void); | 186 | void ath_rate_control_unregister(void); |
190 | 187 | ||