38 #define ito64(x) (sizeof(x) == 1) ? \ 39 (((unsigned long long int)(x)) & (0xff)) : \ 41 (((unsigned long long int)(x)) & 0xffff) : \ 43 (((unsigned long long int)(x)) & 0xffffffff) : \ 44 (unsigned long long int)(x)) 47 #define INCR(_l, _sz) do { \ 49 (_l) &= ((_sz) - 1); \ 53 #define DECR(_l, _sz) do { \ 55 (_l) &= ((_sz) - 1); \ 58 #define A_MAX(a, b) ((a) > (b) ? (a) : (b)) 60 #define TSF_TO_TU(_h,_l) \ 61 ((((u32)(_h)) << 22) | (((u32)(_l)) >> 10)) 63 #define ATH_TXQ_SETUP(sc, i) ((sc)->tx.txqsetup & (1<<i)) 74 #define ATH_TXBUF_RESET(_bf) do { \ 75 (_bf)->bf_stale = 0; \ 76 (_bf)->bf_lastbf = NULL; \ 77 (_bf)->bf_next = NULL; \ 78 memset(&((_bf)->bf_state), 0, \ 79 sizeof(struct ath_buf_state)); \ 82 #define ATH_RXBUF_RESET(_bf) do { \ 83 (_bf)->bf_stale = 0; \ 100 #define bf_isampdu(bf) (bf->bf_state.bf_type & BUF_AMPDU) 101 #define bf_isaggr(bf) (bf->bf_state.bf_type & BUF_AGGR) 102 #define bf_isxretried(bf) (bf->bf_state.bf_type & BUF_XRETRY) 104 #define ATH_TXSTATUS_RING_SIZE 64 115 int nbuf,
int ndesc,
int is_tx);
125 #define ATH_TXBUF_RESERVE 5 126 #define ATH_MAX_QDEPTH (ATH_TXBUF / 4 - ATH_TXBUF_RESERVE) 127 #define ATH_TXMAXTRY 13 129 #define TID_TO_WME_AC(_tid) \ 130 ((((_tid) == 0) || ((_tid) == 3)) ? WME_AC_BE : \ 131 (((_tid) == 1) || ((_tid) == 2)) ? WME_AC_BK : \ 132 (((_tid) == 4) || ((_tid) == 5)) ? WME_AC_VI : \ 135 #define ATH_AGGR_DELIM_SZ 4 136 #define ATH_AGGR_MINPLEN 256 138 #define ATH_AGGR_ENCRYPTDELIM 10 140 #define ATH_AGGR_MIN_QDEPTH 2 141 #define ATH_AMPDU_SUBFRAME_DEFAULT 32 144 #define IEEE80211_SEQ_SEQ_SHIFT 4 145 #define IEEE80211_SEQ_MAX 4096 146 #define IEEE80211_WEP_IVLEN 3 147 #define IEEE80211_WEP_KIDLEN 1 148 #define IEEE80211_WEP_CRCLEN 4 149 #define IEEE80211_MAX_MPDU_LEN (3840 + FCS_LEN + \ 150 (IEEE80211_WEP_IVLEN + \ 151 IEEE80211_WEP_KIDLEN + \ 152 IEEE80211_WEP_CRCLEN)) 156 #define ATH_BA_ISSET(_bm, _n) (((_n) < (WME_BA_BMP_SIZE)) && \ 157 ((_bm)[(_n) >> 5] & (1 << ((_n) & 31)))) 160 #define ATH_BA_INDEX(_st, _seq) (((_seq) - (_st)) & (IEEE80211_SEQ_MAX - 1)) 163 #define ATH_AGGR_GET_NDELIM(_len) \ 164 (((_len) >= ATH_AGGR_MINPLEN) ? 0 : \ 165 DIV_ROUND_UP(ATH_AGGR_MINPLEN - (_len), ATH_AGGR_DELIM_SZ)) 167 #define BAW_WITHIN(_start, _bawsz, _seqno) \ 168 ((((_seqno) - (_start)) & 4095) < (_bawsz)) 170 #define ATH_AN_2_TID(_an, _tidno) (&(_an)->tid[(_tidno)]) 172 #define ATH_TX_COMPLETE_POLL_INT 1000 180 #define ATH_TXFIFO_DEPTH 8 262 #define AGGR_CLEANUP BIT(1) 263 #define AGGR_ADDBA_COMPLETE BIT(2) 264 #define AGGR_ADDBA_PROGRESS BIT(3) 273 #define ATH_TX_ERROR 0x01 274 #define ATH_TX_XRETRY 0x02 275 #define ATH_TX_BAR 0x04 321 struct ath_txq *txq,
int retry_tx);
335 #define ATH_STA_SHORT_CALINTERVAL 1000 336 #define ATH_AP_SHORT_CALINTERVAL 100 337 #define ATH_ANI_POLLINTERVAL_OLD 100 338 #define ATH_ANI_POLLINTERVAL_NEW 1000 339 #define ATH_LONG_CALINTERVAL_INT 1000 340 #define ATH_LONG_CALINTERVAL 30000 341 #define ATH_RESTART_CALINTERVAL 1200000 354 #define DEFAULT_CACHELINE 32 355 #define ATH_REGCLASSIDS_MAX 10 356 #define ATH_CABQ_READY_TIME 80 357 #define ATH_MAX_SW_RETRIES 10 358 #define ATH_CHAN_MAX 255 360 #define ATH_TXPOWER_MAX 100 361 #define ATH_RATE_DUMMY_MARKER 0 363 #define SC_OP_INVALID BIT(0) 364 #define SC_OP_BEACONS BIT(1) 365 #define SC_OP_RXAGGR BIT(2) 366 #define SC_OP_TXAGGR BIT(3) 367 #define SC_OP_OFFCHANNEL BIT(4) 368 #define SC_OP_PREAMBLE_SHORT BIT(5) 369 #define SC_OP_PROTECT_ENABLE BIT(6) 370 #define SC_OP_RXFLUSH BIT(7) 371 #define SC_OP_LED_ASSOCIATED BIT(8) 372 #define SC_OP_LED_ON BIT(9) 373 #define SC_OP_TSF_RESET BIT(11) 374 #define SC_OP_BT_PRIORITY_DETECTED BIT(12) 375 #define SC_OP_BT_SCAN BIT(13) 376 #define SC_OP_ANI_RUN BIT(14) 377 #define SC_OP_ENABLE_APM BIT(15) 378 #define SC_OP_PRIM_STA_VIF BIT(16) 381 #define PS_WAIT_FOR_BEACON BIT(0) 382 #define PS_WAIT_FOR_CAB BIT(1) 383 #define PS_WAIT_FOR_PSPOLL_DATA BIT(2) 384 #define PS_WAIT_FOR_TX_ACK BIT(3) 385 #define PS_BEACON_SYNC BIT(4) 386 #define PS_TSFOOR_SYNC BIT(5) 388 struct ath_rate_table;
int ath9k_modparam_nohwcrypt
@txq_map: Index is mac80211 queue number.
void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *dd, struct list_head *head)
struct io_buffer * bf_mpdu
struct ath_atx_ac ac[WME_NUM_AC]
unsigned long tx_complete_work_timer
struct ath_atx_tid tid[WME_NUM_TID]
int ath_rx_tasklet(struct ath_softc *sc, int flush, int hp)
void ath_tx_tasklet(struct ath_softc *sc)
struct survey_info * cur_survey
unsigned long ps_usecount
void(* paprd_complete)(struct ath_softc *sc)
struct ath_buf_state bf_state
int ath9k_setpower(struct ath_softc *sc, enum ath9k_power_mode mode)
struct ath_buf * rx_bufptr
void ath_tx_cleanupq(struct ath_softc *sc, struct ath_txq *txq)
uint16_t mode
Acceleration mode.
void ath9k_tasklet(struct ath_softc *sc)
uint32_t type
Operating system type.
void ath9k_rfkill_poll_state(struct net80211_device *dev)
u8 ath_txchainmask_reduction(struct ath_softc *sc, u8 chainmask, u32 rate)
void(* hw_check_work)(struct ath_softc *sc)
void ath_tx_cleanup(struct ath_softc *sc)
u32 ath_calcrxfilter(struct ath_softc *sc)
#define ATH9K_NUM_CHANNELS
void ath_draintxq(struct ath_softc *sc, struct ath_txq *txq, int retry_tx)
struct net80211_channel * channel
int ath_tx_start(struct net80211_device *dev, struct io_buffer *iob, struct ath_tx_control *txctl)
void ath9k_set_hw_capab(struct ath_softc *sc, struct net80211_device *dev)
struct ath_txq txq[ATH9K_NUM_TX_QUEUES]
int ath_drain_all_txq(struct ath_softc *sc, int retry_tx)
A doubly-linked list entry (or list head)
int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd, struct list_head *head, const char *name, int nbuf, int ndesc, int is_tx)
int ath_txq_update(struct ath_softc *sc, int qnum, struct ath9k_tx_queue_info *q)
buffer_type
enum buffer_type - Buffer type flags
struct net80211_device * dev
void ath_radio_enable(struct ath_softc *sc, struct net80211_device *dev)
Operations that must be implemented by an 802.11 driver.
void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq)
static void ath_read_cachesize(struct ath_common *common, int *csz)
int ath9k_uses_beacons(int type)
void(* paprd_work)(struct ath_softc *sc)
void(* tx_complete_work)(struct ath_softc *sc)
Information on the capabilities of an 802.11 hardware device.
unsigned long bfs_paprd_timestamp
#define BITS_TO_LONGS(nr)
struct net80211_device_operations ath9k_ops
void(* hw_pll_work)(struct ath_softc *sc)
u64 channel_time_ext_busy
void ath9k_init_crypto(struct ath_softc *sc)
struct list_head txq_fifo[ATH_TXFIFO_DEPTH]
uint8_t subtype
Slow protocols subtype.
Structure encapsulating the complete state of an 802.11 device.
struct ath_buf * bf_lastbf
#define ATH9K_NUM_TX_QUEUES
int ath_set_channel(struct ath_softc *sc, struct net80211_device *dev, struct ath9k_channel *hchan)
void ath_start_rfkill_poll(struct ath_softc *sc)
struct net80211_hw_info * hwinfo
unsigned int hw_busy_count
int ath_reset(struct ath_softc *sc, int retry_tx)
struct ib_cm_common common
unsigned long hw_pll_work_timer
void ath_rx_cleanup(struct ath_softc *sc)
void ath9k_deinit_device(struct ath_softc *sc)
enum ath9k_key_type keytype
int ath_startrecv(struct ath_softc *sc)
int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid, const struct ath_bus_ops *bus_ops)
#define NET80211_MAX_RATES
The maximum number of TX rates we allow to be configured simultaneously.
struct list_head rx_buffers
struct ath9k_hw_cal_data caldata
void ath_ani_calibrate(struct ath_softc *sc)
void ath_flushrecv(struct ath_softc *sc)
int ath_tx_init(struct ath_softc *sc, int nbufs)
unsigned long tx_buf[BITS_TO_LONGS(ATH_TID_MAX_BUFS)]
void ath_hw_pll_work(struct ath_softc *sc)
struct survey_info survey[ATH9K_NUM_CHANNELS]
void(* intr_tq)(struct ath_softc *sc)
struct list_head txq_fifo_pending
struct ath9k_legacy_rate rates[NET80211_MAX_RATES]
int ath_stoprecv(struct ath_softc *sc)
void ath_radio_disable(struct ath_softc *sc, struct net80211_device *dev)
void ath_isr(struct net80211_device *dev)
struct ath_txq * txq_map[WME_NUM_AC]
int ath_rx_init(struct ath_softc *sc, int nbufs)
struct ath_txq * ath_txq_setup(struct ath_softc *sc, int qtype, int subtype)
struct ath_descdma txsdma
struct ath_buf * dd_bufptr
struct ath_rx_edma rx_edma[ATH9K_RX_QUEUE_MAX]