aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/mac.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/mac.h')
-rw-r--r--drivers/net/wireless/ath/ath9k/mac.h63
1 files changed, 51 insertions, 12 deletions
diff --git a/drivers/net/wireless/ath/ath9k/mac.h b/drivers/net/wireless/ath/ath9k/mac.h
index f56e77da6c3e..29851e6376a9 100644
--- a/drivers/net/wireless/ath/ath9k/mac.h
+++ b/drivers/net/wireless/ath/ath9k/mac.h
@@ -76,6 +76,10 @@
76#define ATH9K_TXERR_FIFO 0x04 76#define ATH9K_TXERR_FIFO 0x04
77#define ATH9K_TXERR_XTXOP 0x08 77#define ATH9K_TXERR_XTXOP 0x08
78#define ATH9K_TXERR_TIMER_EXPIRED 0x10 78#define ATH9K_TXERR_TIMER_EXPIRED 0x10
79#define ATH9K_TX_ACKED 0x20
80#define ATH9K_TXERR_MASK \
81 (ATH9K_TXERR_XRETRY | ATH9K_TXERR_FILT | ATH9K_TXERR_FIFO | \
82 ATH9K_TXERR_XTXOP | ATH9K_TXERR_TIMER_EXPIRED)
79 83
80#define ATH9K_TX_BA 0x01 84#define ATH9K_TX_BA 0x01
81#define ATH9K_TX_PWRMGMT 0x02 85#define ATH9K_TX_PWRMGMT 0x02
@@ -85,9 +89,15 @@
85#define ATH9K_TX_SW_ABORTED 0x40 89#define ATH9K_TX_SW_ABORTED 0x40
86#define ATH9K_TX_SW_FILTERED 0x80 90#define ATH9K_TX_SW_FILTERED 0x80
87 91
92/* 64 bytes */
88#define MIN_TX_FIFO_THRESHOLD 0x1 93#define MIN_TX_FIFO_THRESHOLD 0x1
94
95/*
96 * Single stream device AR9285 and AR9271 require 2 KB
97 * to work around a hardware issue, all other devices
98 * have can use the max 4 KB limit.
99 */
89#define MAX_TX_FIFO_THRESHOLD ((4096 / 64) - 1) 100#define MAX_TX_FIFO_THRESHOLD ((4096 / 64) - 1)
90#define INIT_TX_FIFO_THRESHOLD MIN_TX_FIFO_THRESHOLD
91 101
92struct ath_tx_status { 102struct ath_tx_status {
93 u32 ts_tstamp; 103 u32 ts_tstamp;
@@ -157,6 +167,40 @@ struct ath_rx_status {
157#define ATH9K_RXKEYIX_INVALID ((u8)-1) 167#define ATH9K_RXKEYIX_INVALID ((u8)-1)
158#define ATH9K_TXKEYIX_INVALID ((u32)-1) 168#define ATH9K_TXKEYIX_INVALID ((u32)-1)
159 169
170enum ath9k_phyerr {
171 ATH9K_PHYERR_UNDERRUN = 0, /* Transmit underrun */
172 ATH9K_PHYERR_TIMING = 1, /* Timing error */
173 ATH9K_PHYERR_PARITY = 2, /* Illegal parity */
174 ATH9K_PHYERR_RATE = 3, /* Illegal rate */
175 ATH9K_PHYERR_LENGTH = 4, /* Illegal length */
176 ATH9K_PHYERR_RADAR = 5, /* Radar detect */
177 ATH9K_PHYERR_SERVICE = 6, /* Illegal service */
178 ATH9K_PHYERR_TOR = 7, /* Transmit override receive */
179
180 ATH9K_PHYERR_OFDM_TIMING = 17,
181 ATH9K_PHYERR_OFDM_SIGNAL_PARITY = 18,
182 ATH9K_PHYERR_OFDM_RATE_ILLEGAL = 19,
183 ATH9K_PHYERR_OFDM_LENGTH_ILLEGAL = 20,
184 ATH9K_PHYERR_OFDM_POWER_DROP = 21,
185 ATH9K_PHYERR_OFDM_SERVICE = 22,
186 ATH9K_PHYERR_OFDM_RESTART = 23,
187 ATH9K_PHYERR_FALSE_RADAR_EXT = 24,
188
189 ATH9K_PHYERR_CCK_TIMING = 25,
190 ATH9K_PHYERR_CCK_HEADER_CRC = 26,
191 ATH9K_PHYERR_CCK_RATE_ILLEGAL = 27,
192 ATH9K_PHYERR_CCK_SERVICE = 30,
193 ATH9K_PHYERR_CCK_RESTART = 31,
194 ATH9K_PHYERR_CCK_LENGTH_ILLEGAL = 32,
195 ATH9K_PHYERR_CCK_POWER_DROP = 33,
196
197 ATH9K_PHYERR_HT_CRC_ERROR = 34,
198 ATH9K_PHYERR_HT_LENGTH_ILLEGAL = 35,
199 ATH9K_PHYERR_HT_RATE_ILLEGAL = 36,
200
201 ATH9K_PHYERR_MAX = 37,
202};
203
160struct ath_desc { 204struct ath_desc {
161 u32 ds_link; 205 u32 ds_link;
162 u32 ds_data; 206 u32 ds_data;
@@ -380,6 +424,11 @@ struct ar5416_desc {
380#define AR_TxBaStatus 0x40000000 424#define AR_TxBaStatus 0x40000000
381#define AR_TxStatusRsvd01 0x80000000 425#define AR_TxStatusRsvd01 0x80000000
382 426
427/*
428 * AR_FrmXmitOK - Frame transmission success flag. If set, the frame was
429 * transmitted successfully. If clear, no ACK or BA was received to indicate
430 * successful transmission when we were expecting an ACK or BA.
431 */
383#define AR_FrmXmitOK 0x00000001 432#define AR_FrmXmitOK 0x00000001
384#define AR_ExcessiveRetries 0x00000002 433#define AR_ExcessiveRetries 0x00000002
385#define AR_FIFOUnderrun 0x00000004 434#define AR_FIFOUnderrun 0x00000004
@@ -614,19 +663,8 @@ enum ath9k_cipher {
614 ATH9K_CIPHER_MIC = 127 663 ATH9K_CIPHER_MIC = 127
615}; 664};
616 665
617enum ath9k_ht_macmode {
618 ATH9K_HT_MACMODE_20 = 0,
619 ATH9K_HT_MACMODE_2040 = 1,
620};
621
622enum ath9k_ht_extprotspacing {
623 ATH9K_HT_EXTPROTSPACING_20 = 0,
624 ATH9K_HT_EXTPROTSPACING_25 = 1,
625};
626
627struct ath_hw; 666struct ath_hw;
628struct ath9k_channel; 667struct ath9k_channel;
629struct ath_rate_table;
630 668
631u32 ath9k_hw_gettxbuf(struct ath_hw *ah, u32 q); 669u32 ath9k_hw_gettxbuf(struct ath_hw *ah, u32 q);
632void ath9k_hw_puttxbuf(struct ath_hw *ah, u32 q, u32 txdp); 670void ath9k_hw_puttxbuf(struct ath_hw *ah, u32 q, u32 txdp);
@@ -677,5 +715,6 @@ void ath9k_hw_rxena(struct ath_hw *ah);
677void ath9k_hw_startpcureceive(struct ath_hw *ah); 715void ath9k_hw_startpcureceive(struct ath_hw *ah);
678void ath9k_hw_stoppcurecv(struct ath_hw *ah); 716void ath9k_hw_stoppcurecv(struct ath_hw *ah);
679bool ath9k_hw_stopdmarecv(struct ath_hw *ah); 717bool ath9k_hw_stopdmarecv(struct ath_hw *ah);
718int ath9k_hw_beaconq_setup(struct ath_hw *ah);
680 719
681#endif /* MAC_H */ 720#endif /* MAC_H */