aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/rc.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/rc.h')
-rw-r--r--drivers/net/wireless/ath/ath9k/rc.h29
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
22struct ath_softc; 24struct 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 */
103struct ath_rate_table { 109struct 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
168enum ath9k_internal_frame_type { 179enum 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
174struct 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
186void ath_rate_attach(struct ath_softc *sc);
187u8 ath_rate_findrateix(struct ath_softc *sc, u8 dot11_rate);
188int ath_rate_control_register(void); 185int ath_rate_control_register(void);
189void ath_rate_control_unregister(void); 186void ath_rate_control_unregister(void);
190 187