37 #define ito64(x) (sizeof(x) == 1) ? \ 38 (((unsigned long long int)(x)) & (0xff)) : \ 40 (((unsigned long long int)(x)) & 0xffff) : \ 42 (((unsigned long long int)(x)) & 0xffffffff) : \ 43 (unsigned long long int)(x)) 46 #define INCR(_l, _sz) do { \ 48 (_l) &= ((_sz) - 1); \ 52 #define DECR(_l, _sz) do { \ 54 (_l) &= ((_sz) - 1); \ 57 #define A_MAX(a, b) ((a) > (b) ? (a) : (b)) 59 #define TSF_TO_TU(_h,_l) \ 60 ((((u32)(_h)) << 22) | (((u32)(_l)) >> 10)) 62 #define ATH_TXQ_SETUP(sc, i) ((sc)->tx.txqsetup & (1<<i)) 73 #define ATH_TXBUF_RESET(_bf) do { \ 74 (_bf)->bf_stale = 0; \ 75 (_bf)->bf_lastbf = NULL; \ 76 (_bf)->bf_next = NULL; \ 77 memset(&((_bf)->bf_state), 0, \ 78 sizeof(struct ath_buf_state)); \ 81 #define ATH_RXBUF_RESET(_bf) do { \ 82 (_bf)->bf_stale = 0; \ 99 #define bf_isampdu(bf) (bf->bf_state.bf_type & BUF_AMPDU) 100 #define bf_isaggr(bf) (bf->bf_state.bf_type & BUF_AGGR) 101 #define bf_isxretried(bf) (bf->bf_state.bf_type & BUF_XRETRY) 103 #define ATH_TXSTATUS_RING_SIZE 64 114 int nbuf,
int ndesc,
int is_tx);
124 #define ATH_TXBUF_RESERVE 5 125 #define ATH_MAX_QDEPTH (ATH_TXBUF / 4 - ATH_TXBUF_RESERVE) 126 #define ATH_TXMAXTRY 13 128 #define TID_TO_WME_AC(_tid) \ 129 ((((_tid) == 0) || ((_tid) == 3)) ? WME_AC_BE : \ 130 (((_tid) == 1) || ((_tid) == 2)) ? WME_AC_BK : \ 131 (((_tid) == 4) || ((_tid) == 5)) ? WME_AC_VI : \ 134 #define ATH_AGGR_DELIM_SZ 4 135 #define ATH_AGGR_MINPLEN 256 137 #define ATH_AGGR_ENCRYPTDELIM 10 139 #define ATH_AGGR_MIN_QDEPTH 2 140 #define ATH_AMPDU_SUBFRAME_DEFAULT 32 143 #define IEEE80211_SEQ_SEQ_SHIFT 4 144 #define IEEE80211_SEQ_MAX 4096 145 #define IEEE80211_WEP_IVLEN 3 146 #define IEEE80211_WEP_KIDLEN 1 147 #define IEEE80211_WEP_CRCLEN 4 148 #define IEEE80211_MAX_MPDU_LEN (3840 + FCS_LEN + \ 149 (IEEE80211_WEP_IVLEN + \ 150 IEEE80211_WEP_KIDLEN + \ 151 IEEE80211_WEP_CRCLEN)) 155 #define ATH_BA_ISSET(_bm, _n) (((_n) < (WME_BA_BMP_SIZE)) && \ 156 ((_bm)[(_n) >> 5] & (1 << ((_n) & 31)))) 159 #define ATH_BA_INDEX(_st, _seq) (((_seq) - (_st)) & (IEEE80211_SEQ_MAX - 1)) 162 #define ATH_AGGR_GET_NDELIM(_len) \ 163 (((_len) >= ATH_AGGR_MINPLEN) ? 0 : \ 164 DIV_ROUND_UP(ATH_AGGR_MINPLEN - (_len), ATH_AGGR_DELIM_SZ)) 166 #define BAW_WITHIN(_start, _bawsz, _seqno) \ 167 ((((_seqno) - (_start)) & 4095) < (_bawsz)) 169 #define ATH_AN_2_TID(_an, _tidno) (&(_an)->tid[(_tidno)]) 171 #define ATH_TX_COMPLETE_POLL_INT 1000 179 #define ATH_TXFIFO_DEPTH 8 261 #define AGGR_CLEANUP BIT(1) 262 #define AGGR_ADDBA_COMPLETE BIT(2) 263 #define AGGR_ADDBA_PROGRESS BIT(3) 272 #define ATH_TX_ERROR 0x01 273 #define ATH_TX_XRETRY 0x02 274 #define ATH_TX_BAR 0x04 320 struct ath_txq *txq,
int retry_tx);
334 #define ATH_STA_SHORT_CALINTERVAL 1000 335 #define ATH_AP_SHORT_CALINTERVAL 100 336 #define ATH_ANI_POLLINTERVAL_OLD 100 337 #define ATH_ANI_POLLINTERVAL_NEW 1000 338 #define ATH_LONG_CALINTERVAL_INT 1000 339 #define ATH_LONG_CALINTERVAL 30000 340 #define ATH_RESTART_CALINTERVAL 1200000 353 #define DEFAULT_CACHELINE 32 354 #define ATH_REGCLASSIDS_MAX 10 355 #define ATH_CABQ_READY_TIME 80 356 #define ATH_MAX_SW_RETRIES 10 357 #define ATH_CHAN_MAX 255 359 #define ATH_TXPOWER_MAX 100 360 #define ATH_RATE_DUMMY_MARKER 0 362 #define SC_OP_INVALID BIT(0) 363 #define SC_OP_BEACONS BIT(1) 364 #define SC_OP_RXAGGR BIT(2) 365 #define SC_OP_TXAGGR BIT(3) 366 #define SC_OP_OFFCHANNEL BIT(4) 367 #define SC_OP_PREAMBLE_SHORT BIT(5) 368 #define SC_OP_PROTECT_ENABLE BIT(6) 369 #define SC_OP_RXFLUSH BIT(7) 370 #define SC_OP_LED_ASSOCIATED BIT(8) 371 #define SC_OP_LED_ON BIT(9) 372 #define SC_OP_TSF_RESET BIT(11) 373 #define SC_OP_BT_PRIORITY_DETECTED BIT(12) 374 #define SC_OP_BT_SCAN BIT(13) 375 #define SC_OP_ANI_RUN BIT(14) 376 #define SC_OP_ENABLE_APM BIT(15) 377 #define SC_OP_PRIM_STA_VIF BIT(16) 380 #define PS_WAIT_FOR_BEACON BIT(0) 381 #define PS_WAIT_FOR_CAB BIT(1) 382 #define PS_WAIT_FOR_PSPOLL_DATA BIT(2) 383 #define PS_WAIT_FOR_TX_ACK BIT(3) 384 #define PS_BEACON_SYNC BIT(4) 385 #define PS_TSFOOR_SYNC BIT(5) 387 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)
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]