Data Structures | Macros | Functions | Variables
ar9003_mac.h File Reference

Go to the source code of this file.

Data Structures

struct  ar9003_rxs
struct  ar9003_txc
struct  ar9003_txs


#define AR_DescId   0xffff0000
#define AR_DescId_S   16
#define AR_CtrlStat   0x00004000
#define AR_CtrlStat_S   14
#define AR_TxRxDesc   0x00008000
#define AR_TxRxDesc_S   15
#define AR_TxQcuNum   0x00000f00
#define AR_TxQcuNum_S   8
#define AR_BufLen   0x0fff0000
#define AR_BufLen_S   16
#define AR_TxDescId   0xffff0000
#define AR_TxDescId_S   16
#define AR_TxPtrChkSum   0x0000ffff
#define AR_LowRxChain   0x00004000
#define AR_Not_Sounding   0x20000000
#define AR_PAPRDChainMask   0x00000e00
#define AR_PAPRDChainMask_S   9
#define MAP_ISR_S2_CST   6
#define MAP_ISR_S2_GTT   6
#define MAP_ISR_S2_TIM   3
#define MAP_ISR_S2_CABEND   0
#define MAP_ISR_S2_DTIMSYNC   7
#define MAP_ISR_S2_DTIM   7
#define MAP_ISR_S2_TSFOOR   4
#define MAP_ISR_S2_BB_WATCHDOG   6
#define AR9003TXC_CONST(_ds)   ((const struct ar9003_txc *) _ds)


struct ar9003_rxs __attribute__ ((packed, aligned(4)))
void ar9003_hw_attach_mac_ops (struct ath_hw *hw)
void ath9k_hw_set_rx_bufsize (struct ath_hw *ah, u16 buf_size)
void ath9k_hw_addrxbuf_edma (struct ath_hw *ah, u32 rxdp, enum ath9k_rx_qtype qtype)
int ath9k_hw_process_rxdesc_edma (struct ath_hw *ah, struct ath_rx_status *rxs, void *buf_addr)
void ath9k_hw_reset_txstatus_ring (struct ath_hw *ah)
void ath9k_hw_setup_statusring (struct ath_hw *ah, void *ts_start, u32 ts_paddr_start, u8 size)


u32 ds_info
u32 status1
u32 status2
u32 status3
u32 status4
u32 status5
u32 status6
u32 status7
u32 status8
u32 status9
u32 status10
u32 status11
u32 info
u32 link
 Link to next descriptor. More...
u32 data0
u32 ctl3
u32 data1
u32 ctl5
u32 data2
u32 ctl7
u32 data3
u32 ctl9
u32 ctl10
u32 ctl11
u32 ctl12
u32 ctl13
u32 ctl14
u32 ctl15
u32 ctl16
u32 ctl17
u32 ctl18
u32 ctl19
u32 ctl20
u32 ctl21
u32 ctl22
u32 pad [9]
 Padding. More...

Macro Definition Documentation

◆ AR_DescId

#define AR_DescId   0xffff0000

Definition at line 23 of file ar9003_mac.h.

◆ AR_DescId_S

#define AR_DescId_S   16

Definition at line 24 of file ar9003_mac.h.

◆ AR_CtrlStat

#define AR_CtrlStat   0x00004000

Definition at line 25 of file ar9003_mac.h.

◆ AR_CtrlStat_S

#define AR_CtrlStat_S   14

Definition at line 26 of file ar9003_mac.h.

◆ AR_TxRxDesc

#define AR_TxRxDesc   0x00008000

Definition at line 27 of file ar9003_mac.h.

◆ AR_TxRxDesc_S

#define AR_TxRxDesc_S   15

Definition at line 28 of file ar9003_mac.h.

◆ AR_TxQcuNum

#define AR_TxQcuNum   0x00000f00

Definition at line 29 of file ar9003_mac.h.

◆ AR_TxQcuNum_S

#define AR_TxQcuNum_S   8

Definition at line 30 of file ar9003_mac.h.

◆ AR_BufLen

#define AR_BufLen   0x0fff0000

Definition at line 32 of file ar9003_mac.h.

◆ AR_BufLen_S

#define AR_BufLen_S   16

Definition at line 33 of file ar9003_mac.h.

◆ AR_TxDescId

#define AR_TxDescId   0xffff0000

Definition at line 35 of file ar9003_mac.h.

◆ AR_TxDescId_S

#define AR_TxDescId_S   16

Definition at line 36 of file ar9003_mac.h.

◆ AR_TxPtrChkSum

#define AR_TxPtrChkSum   0x0000ffff

Definition at line 37 of file ar9003_mac.h.

◆ AR_LowRxChain

#define AR_LowRxChain   0x00004000

Definition at line 39 of file ar9003_mac.h.

◆ AR_Not_Sounding

#define AR_Not_Sounding   0x20000000

Definition at line 41 of file ar9003_mac.h.

◆ AR_PAPRDChainMask

#define AR_PAPRDChainMask   0x00000e00

Definition at line 44 of file ar9003_mac.h.

◆ AR_PAPRDChainMask_S

#define AR_PAPRDChainMask_S   9

Definition at line 45 of file ar9003_mac.h.


#define MAP_ISR_S2_CST   6

Definition at line 47 of file ar9003_mac.h.


#define MAP_ISR_S2_GTT   6

Definition at line 48 of file ar9003_mac.h.


#define MAP_ISR_S2_TIM   3

Definition at line 49 of file ar9003_mac.h.


#define MAP_ISR_S2_CABEND   0

Definition at line 50 of file ar9003_mac.h.


#define MAP_ISR_S2_DTIMSYNC   7

Definition at line 51 of file ar9003_mac.h.


#define MAP_ISR_S2_DTIM   7

Definition at line 52 of file ar9003_mac.h.


#define MAP_ISR_S2_TSFOOR   4

Definition at line 53 of file ar9003_mac.h.


#define MAP_ISR_S2_BB_WATCHDOG   6

Definition at line 54 of file ar9003_mac.h.


#define AR9003TXC_CONST (   _ds)    ((const struct ar9003_txc *) _ds)

Definition at line 56 of file ar9003_mac.h.

Function Documentation

◆ __attribute__()

struct ar9003_rxs __attribute__ ( (packed, aligned(4))  )

◆ ar9003_hw_attach_mac_ops()

void ar9003_hw_attach_mac_ops ( struct ath_hw hw)

Definition at line 500 of file ath9k_ar9003_mac.c.

501 {
502  struct ath_hw_ops *ops = ath9k_hw_ops(hw);
507  ops->get_isr = ar9003_hw_get_isr;
517 }
static int ar9003_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked)
static void ar9003_hw_set11n_aggr_first(struct ath_hw *ah, void *ds, u32 aggrLen)
static void ar9003_hw_set_desc_link(void *ds, u32 ds_link)
static void ar9003_hw_set11n_txdesc(struct ath_hw *ah, void *ds, u32 pktlen, enum ath9k_pkt_type type, u32 txpower, u32 keyIx, enum ath9k_key_type keyType, u32 flags)
static void ar9003_hw_fill_txdesc(struct ath_hw *ah __unused, void *ds, u32 seglen, int is_firstseg, int is_lastseg, const void *ds0, u32 buf_addr, unsigned int qcu)
void(* rx_enable)(struct ath_hw *ah)
Definition: hw.h:607
void(* clr11n_aggr)(struct ath_hw *ah, void *ds)
Definition: hw.h:637
Definition: hw.c:16
void(* set11n_aggr_last)(struct ath_hw *ah, void *ds)
Definition: hw.h:636
int(* get_isr)(struct ath_hw *ah, enum ath9k_int *masked)
Definition: hw.h:614
static void ar9003_hw_rx_enable(struct ath_hw *hw)
void(* set11n_ratescenario)(struct ath_hw *ah, void *ds, void *lastds, u32 durUpdateEn, u32 rtsctsRate, u32 rtsctsDuration, struct ath9k_11n_rate_series series[], u32 nseries, u32 flags)
Definition: hw.h:626
static void ar9003_hw_set_clrdmask(struct ath_hw *ah __unused, void *ds, int val)
static void ar9003_hw_set11n_ratescenario(struct ath_hw *ah __unused, void *ds, void *lastds, u32 durUpdateEn, u32 rtsctsRate, u32 rtsctsDuration __unused, struct ath9k_11n_rate_series series[], u32 nseries __unused, u32 flags)
struct ath_hw_ops - callbacks used by hardware code and driver code
Definition: hw.h:603
void(* set11n_txdesc)(struct ath_hw *ah, void *ds, u32 pktLen, enum ath9k_pkt_type type, u32 txPower, u32 keyIx, enum ath9k_key_type keyType, u32 flags)
Definition: hw.h:621
static void ar9003_hw_clr11n_aggr(struct ath_hw *ah __unused, void *ds)
void(* set_clrdmask)(struct ath_hw *ah, void *ds, int val)
Definition: hw.h:638
static void ar9003_hw_set11n_aggr_last(struct ath_hw *ah __unused, void *ds)
static struct ath_hw_ops * ath9k_hw_ops(struct ath_hw *ah)
Definition: hw.h:884
int(* proc_txdesc)(struct ath_hw *ah, void *ds, struct ath_tx_status *ts)
Definition: hw.h:619
static void ar9003_hw_get_desc_link(void *ds, u32 **ds_link)
void(* set11n_aggr_middle)(struct ath_hw *ah, void *ds, u32 numDelims)
Definition: hw.h:634
void(* set11n_aggr_first)(struct ath_hw *ah, void *ds, u32 aggrLen)
Definition: hw.h:632
static void ar9003_hw_set11n_aggr_middle(struct ath_hw *ah __unused, void *ds, u32 numDelims)
void(* fill_txdesc)(struct ath_hw *ah, void *ds, u32 seglen, int is_firstseg, int is_is_lastseg, const void *ds0, u32 buf_addr, unsigned int qcu)
Definition: hw.h:615
void(* get_desc_link)(void *ds, u32 **link)
Definition: hw.h:609
void(* set_desc_link)(void *ds, u32 link)
Definition: hw.h:608
static int ar9003_hw_proc_txdesc(struct ath_hw *ah, void *ds __unused, struct ath_tx_status *ts)

References ar9003_hw_clr11n_aggr(), ar9003_hw_fill_txdesc(), ar9003_hw_get_desc_link(), ar9003_hw_get_isr(), ar9003_hw_proc_txdesc(), ar9003_hw_rx_enable(), ar9003_hw_set11n_aggr_first(), ar9003_hw_set11n_aggr_last(), ar9003_hw_set11n_aggr_middle(), ar9003_hw_set11n_ratescenario(), ar9003_hw_set11n_txdesc(), ar9003_hw_set_clrdmask(), ar9003_hw_set_desc_link(), ath9k_hw_ops(), ath_hw_ops::clr11n_aggr, ath_hw_ops::fill_txdesc, ath_hw_ops::get_desc_link, ath_hw_ops::get_isr, ath_hw_ops::proc_txdesc, ath_hw_ops::rx_enable, ath_hw_ops::set11n_aggr_first, ath_hw_ops::set11n_aggr_last, ath_hw_ops::set11n_aggr_middle, ath_hw_ops::set11n_ratescenario, ath_hw_ops::set11n_txdesc, ath_hw_ops::set_clrdmask, and ath_hw_ops::set_desc_link.

Referenced by ar9003_hw_attach_ops().

◆ ath9k_hw_set_rx_bufsize()

void ath9k_hw_set_rx_bufsize ( struct ath_hw ah,
u16  buf_size 

Definition at line 519 of file ath9k_ar9003_mac.c.

520 {
522 }
Definition: reg.h:150
#define REG_WRITE(_ah, _reg, _val)
Definition: hw.h:77
Definition: reg.h:149
uint8_t ah
Definition: registers.h:85


Referenced by ath9k_hw_set_dma().

◆ ath9k_hw_addrxbuf_edma()

void ath9k_hw_addrxbuf_edma ( struct ath_hw ah,
u32  rxdp,
enum ath9k_rx_qtype  qtype 

Definition at line 524 of file ath9k_ar9003_mac.c.

526 {
527  if (qtype == ATH9K_RX_QUEUE_HP)
529  else
531 }
#define REG_WRITE(_ah, _reg, _val)
Definition: hw.h:77
Definition: sis900.h:32
uint8_t ah
Definition: registers.h:85
#define AR_LP_RXDP
Definition: reg.h:169
#define AR_HP_RXDP
Definition: reg.h:168

References ah, AR_HP_RXDP, AR_LP_RXDP, ATH9K_RX_QUEUE_HP, REG_WRITE, and rxdp.

◆ ath9k_hw_process_rxdesc_edma()

int ath9k_hw_process_rxdesc_edma ( struct ath_hw ah,
struct ath_rx_status rxs,
void *  buf_addr 

◆ ath9k_hw_reset_txstatus_ring()

void ath9k_hw_reset_txstatus_ring ( struct ath_hw ah)

Definition at line 642 of file ath9k_ar9003_mac.c.

643 {
644  ah->ts_tail = 0;
646  memset((void *) ah->ts_ring, 0,
647  ah->ts_size * sizeof(struct ar9003_txs));
649  DBG2("ath9k: "
650  "TS Start 0x%x End 0x%x Virt %p, Size %d\n",
651  ah->ts_paddr_start, ah->ts_paddr_end,
652  ah->ts_ring, ah->ts_size);
654  REG_WRITE(ah, AR_Q_STATUS_RING_START, ah->ts_paddr_start);
655  REG_WRITE(ah, AR_Q_STATUS_RING_END, ah->ts_paddr_end);
656 }
Definition: reg.h:384
Definition: reg.h:383
#define REG_WRITE(_ah, _reg, _val)
Definition: hw.h:77
uint8_t ah
Definition: registers.h:85
#define DBG2(...)
Definition: compiler.h:515
void * memset(void *dest, int character, size_t len) __nonnull


Referenced by ath9k_hw_set_dma(), and ath9k_hw_setup_statusring().

◆ ath9k_hw_setup_statusring()

void ath9k_hw_setup_statusring ( struct ath_hw ah,
void *  ts_start,
u32  ts_paddr_start,
u8  size 

Definition at line 658 of file ath9k_ar9003_mac.c.

661 {
663  ah->ts_paddr_start = ts_paddr_start;
664  ah->ts_paddr_end = ts_paddr_start + (size * sizeof(struct ar9003_txs));
665  ah->ts_size = size;
666  ah->ts_ring = (struct ar9003_txs *) ts_start;
669 }
void ath9k_hw_reset_txstatus_ring(struct ath_hw *ah)
uint8_t size
Entry size (in 32-bit words)
Definition: ena.h:16
uint8_t ah
Definition: registers.h:85

References ah, ath9k_hw_reset_txstatus_ring(), and size.

Variable Documentation

◆ ds_info

u32 ds_info

Definition at line 67 of file ar9003_mac.h.

◆ status1

u32 status1

Definition at line 68 of file ar9003_mac.h.

Referenced by txnic_lmac_diag(), and txnic_lmac_update_link().

◆ status2

u32 status2

Definition at line 69 of file ar9003_mac.h.

Referenced by txnic_lmac_diag().

◆ status3

u32 status3

Definition at line 70 of file ar9003_mac.h.

◆ status4

u32 status4

Definition at line 71 of file ar9003_mac.h.

◆ status5

u32 status5

Definition at line 72 of file ar9003_mac.h.

◆ status6

u32 status6

Definition at line 73 of file ar9003_mac.h.

◆ status7

u32 status7

Definition at line 74 of file ar9003_mac.h.

◆ status8

u32 status8

Definition at line 75 of file ar9003_mac.h.

◆ status9

u32 status9

Definition at line 76 of file ar9003_mac.h.

◆ status10

u32 status10

Definition at line 77 of file ar9003_mac.h.

◆ status11

u32 status11

Definition at line 78 of file ar9003_mac.h.

◆ info

u32 info

◆ link

uint64_t link

◆ data0

u32 data0

◆ ctl3

u32 ctl3

Definition at line 70 of file ar9003_mac.h.

◆ data1

u32 data1

◆ ctl5

u32 ctl5

Definition at line 72 of file ar9003_mac.h.

◆ data2

u32 data2

◆ ctl7

u32 ctl7

Definition at line 74 of file ar9003_mac.h.

◆ data3

u32 data3

Definition at line 75 of file ar9003_mac.h.

◆ ctl9

u32 ctl9

Definition at line 76 of file ar9003_mac.h.

◆ ctl10

u32 ctl10

Definition at line 77 of file ar9003_mac.h.

◆ ctl11

u32 ctl11

Definition at line 78 of file ar9003_mac.h.

Referenced by ar9003_hw_set11n_ratescenario().

◆ ctl12

u32 ctl12

Definition at line 79 of file ar9003_mac.h.

◆ ctl13

u32 ctl13

Definition at line 80 of file ar9003_mac.h.

◆ ctl14

u32 ctl14

Definition at line 81 of file ar9003_mac.h.

◆ ctl15

u32 ctl15

Definition at line 82 of file ar9003_mac.h.

◆ ctl16

u32 ctl16

Definition at line 83 of file ar9003_mac.h.

◆ ctl17

u32 ctl17

Definition at line 84 of file ar9003_mac.h.

Referenced by ar9003_hw_set11n_aggr_first(), and ar9003_hw_set11n_aggr_middle().

◆ ctl18

u32 ctl18

Definition at line 85 of file ar9003_mac.h.

◆ ctl19

u32 ctl19

Definition at line 86 of file ar9003_mac.h.

◆ ctl20

u32 ctl20

Definition at line 87 of file ar9003_mac.h.

◆ ctl21

u32 ctl21

Definition at line 88 of file ar9003_mac.h.

◆ ctl22

u32 ctl22

Definition at line 89 of file ar9003_mac.h.

◆ pad

uint8_t pad