iPXE
ar9003_mac.h File Reference

Go to the source code of this file.

Data Structures

struct  ar9003_rxs
struct  ar9003_txc
struct  ar9003_txs

Macros

#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)

Functions

 FILE_SECBOOT (FORBIDDEN)
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)

Variables

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.
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.

Macro Definition Documentation

◆ AR_DescId

#define AR_DescId   0xffff0000

Definition at line 25 of file ar9003_mac.h.

Referenced by ar9003_hw_proc_txdesc(), and ath9k_hw_process_rxdesc_edma().

◆ AR_DescId_S

#define AR_DescId_S   16

Definition at line 26 of file ar9003_mac.h.

Referenced by ar9003_hw_fill_txdesc().

◆ AR_CtrlStat

#define AR_CtrlStat   0x00004000

Definition at line 27 of file ar9003_mac.h.

Referenced by ath9k_hw_process_rxdesc_edma().

◆ AR_CtrlStat_S

#define AR_CtrlStat_S   14

Definition at line 28 of file ar9003_mac.h.

Referenced by ar9003_hw_fill_txdesc().

◆ AR_TxRxDesc

#define AR_TxRxDesc   0x00008000

Definition at line 29 of file ar9003_mac.h.

Referenced by ar9003_hw_proc_txdesc(), and ath9k_hw_process_rxdesc_edma().

◆ AR_TxRxDesc_S

#define AR_TxRxDesc_S   15

Definition at line 30 of file ar9003_mac.h.

Referenced by ar9003_hw_fill_txdesc().

◆ AR_TxQcuNum

#define AR_TxQcuNum   0x00000f00

Definition at line 31 of file ar9003_mac.h.

Referenced by ar9003_hw_proc_txdesc().

◆ AR_TxQcuNum_S

#define AR_TxQcuNum_S   8

Definition at line 32 of file ar9003_mac.h.

Referenced by ar9003_hw_fill_txdesc().

◆ AR_BufLen

#define AR_BufLen   0x0fff0000

Definition at line 34 of file ar9003_mac.h.

Referenced by ar9003_hw_fill_txdesc(), and ath9k_hw_setuprxdesc().

◆ AR_BufLen_S

#define AR_BufLen_S   16

Definition at line 35 of file ar9003_mac.h.

Referenced by ar9003_hw_fill_txdesc().

◆ AR_TxDescId

#define AR_TxDescId   0xffff0000

Definition at line 37 of file ar9003_mac.h.

Referenced by ar9003_hw_proc_txdesc().

◆ AR_TxDescId_S

#define AR_TxDescId_S   16

Definition at line 38 of file ar9003_mac.h.

Referenced by ar9003_hw_fill_txdesc().

◆ AR_TxPtrChkSum

#define AR_TxPtrChkSum   0x0000ffff

Definition at line 39 of file ar9003_mac.h.

Referenced by ar9003_calc_ptr_chksum(), and ar9003_hw_set_desc_link().

◆ AR_LowRxChain

#define AR_LowRxChain   0x00004000

Definition at line 41 of file ar9003_mac.h.

Referenced by ar9003_hw_set11n_txdesc().

◆ AR_Not_Sounding

#define AR_Not_Sounding   0x20000000

Definition at line 43 of file ar9003_mac.h.

Referenced by ar9003_hw_set11n_ratescenario(), and ar9003_hw_set11n_txdesc().

◆ AR_PAPRDChainMask

#define AR_PAPRDChainMask   0x00000e00

Definition at line 46 of file ar9003_mac.h.

Referenced by ar9003_hw_set_paprd_txdesc().

◆ AR_PAPRDChainMask_S

#define AR_PAPRDChainMask_S   9

Definition at line 47 of file ar9003_mac.h.

◆ MAP_ISR_S2_CST

#define MAP_ISR_S2_CST   6

Definition at line 49 of file ar9003_mac.h.

Referenced by ar9003_hw_get_isr().

◆ MAP_ISR_S2_GTT

#define MAP_ISR_S2_GTT   6

Definition at line 50 of file ar9003_mac.h.

Referenced by ar9003_hw_get_isr().

◆ MAP_ISR_S2_TIM

#define MAP_ISR_S2_TIM   3

Definition at line 51 of file ar9003_mac.h.

Referenced by ar9003_hw_get_isr().

◆ MAP_ISR_S2_CABEND

#define MAP_ISR_S2_CABEND   0

Definition at line 52 of file ar9003_mac.h.

Referenced by ar9003_hw_get_isr().

◆ MAP_ISR_S2_DTIMSYNC

#define MAP_ISR_S2_DTIMSYNC   7

Definition at line 53 of file ar9003_mac.h.

Referenced by ar9003_hw_get_isr().

◆ MAP_ISR_S2_DTIM

#define MAP_ISR_S2_DTIM   7

Definition at line 54 of file ar9003_mac.h.

Referenced by ar9003_hw_get_isr().

◆ MAP_ISR_S2_TSFOOR

#define MAP_ISR_S2_TSFOOR   4

Definition at line 55 of file ar9003_mac.h.

Referenced by ar9003_hw_get_isr().

◆ MAP_ISR_S2_BB_WATCHDOG

#define MAP_ISR_S2_BB_WATCHDOG   6

Definition at line 56 of file ar9003_mac.h.

Referenced by ar9003_hw_get_isr().

◆ AR9003TXC_CONST

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

Definition at line 58 of file ar9003_mac.h.

Referenced by ar9003_hw_fill_txdesc().

Function Documentation

◆ FILE_SECBOOT()

FILE_SECBOOT ( FORBIDDEN )

◆ __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 503 of file ath9k_ar9003_mac.c.

504{
505 struct ath_hw_ops *ops = ath9k_hw_ops(hw);
506
520}
static int ar9003_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked)
static void ar9003_hw_get_desc_link(void *ds, u32 **ds_link)
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_rx_enable(struct ath_hw *hw)
static void ar9003_hw_set11n_aggr_last(struct ath_hw *ah __unused, void *ds)
static void ar9003_hw_clr11n_aggr(struct ath_hw *ah __unused, void *ds)
static int ar9003_hw_proc_txdesc(struct ath_hw *ah, void *ds __unused, struct ath_tx_status *ts)
static void ar9003_hw_set11n_aggr_middle(struct ath_hw *ah __unused, void *ds, u32 numDelims)
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)
static void ar9003_hw_set_clrdmask(struct ath_hw *ah __unused, void *ds, int val)
static void ar9003_hw_set11n_aggr_first(struct ath_hw *ah, void *ds, u32 aggrLen)
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)
static struct ath_hw_ops * ath9k_hw_ops(struct ath_hw *ah)
Definition hw.h:885
struct ath_hw_ops - callbacks used by hardware code and driver code
Definition hw.h:604
void(* set11n_aggr_first)(struct ath_hw *ah, void *ds, u32 aggrLen)
Definition hw.h:633
int(* proc_txdesc)(struct ath_hw *ah, void *ds, struct ath_tx_status *ts)
Definition hw.h:620
void(* rx_enable)(struct ath_hw *ah)
Definition hw.h:608
void(* set_desc_link)(void *ds, u32 link)
Definition hw.h:609
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:627
void(* clr11n_aggr)(struct ath_hw *ah, void *ds)
Definition hw.h:638
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:622
void(* set_clrdmask)(struct ath_hw *ah, void *ds, int val)
Definition hw.h:639
void(* set11n_aggr_last)(struct ath_hw *ah, void *ds)
Definition hw.h:637
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:616
int(* get_isr)(struct ath_hw *ah, enum ath9k_int *masked)
Definition hw.h:615
void(* get_desc_link)(void *ds, u32 **link)
Definition hw.h:610
void(* set11n_aggr_middle)(struct ath_hw *ah, void *ds, u32 numDelims)
Definition hw.h:635
Definition hw.c:16

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 522 of file ath9k_ar9003_mac.c.

523{
525}
#define AR_DATABUF_SIZE
Definition reg.h:150
#define AR_DATABUF_SIZE_MASK
Definition reg.h:151
#define REG_WRITE(_ah, _reg, _val)
Definition hw.h:78
uint8_t ah
Definition registers.h:1

References ah, AR_DATABUF_SIZE, AR_DATABUF_SIZE_MASK, REG_WRITE, and u16.

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 527 of file ath9k_ar9003_mac.c.

529{
530 if (qtype == ATH9K_RX_QUEUE_HP)
532 else
534}
#define AR_LP_RXDP
Definition reg.h:170
#define AR_HP_RXDP
Definition reg.h:169
@ ATH9K_RX_QUEUE_HP
Definition hw.h:401
@ rxdp
Definition sis900.h:32

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

◆ ath9k_hw_process_rxdesc_edma()

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

References ah, size, u32, and u8.

◆ ath9k_hw_reset_txstatus_ring()

void ath9k_hw_reset_txstatus_ring ( struct ath_hw * ah)

Definition at line 645 of file ath9k_ar9003_mac.c.

646{
647 ah->ts_tail = 0;
648
649 memset((void *) ah->ts_ring, 0,
650 ah->ts_size * sizeof(struct ar9003_txs));
651
652 DBG2("ath9k: "
653 "TS Start 0x%x End 0x%x Virt %p, Size %d\n",
654 ah->ts_paddr_start, ah->ts_paddr_end,
655 ah->ts_ring, ah->ts_size);
656
657 REG_WRITE(ah, AR_Q_STATUS_RING_START, ah->ts_paddr_start);
658 REG_WRITE(ah, AR_Q_STATUS_RING_END, ah->ts_paddr_end);
659}
#define AR_Q_STATUS_RING_END
Definition reg.h:385
#define AR_Q_STATUS_RING_START
Definition reg.h:384
#define DBG2(...)
Definition compiler.h:515
void * memset(void *dest, int character, size_t len) __nonnull

References ah, AR_Q_STATUS_RING_END, AR_Q_STATUS_RING_START, DBG2, memset(), and REG_WRITE.

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 661 of file ath9k_ar9003_mac.c.

664{
665
666 ah->ts_paddr_start = ts_paddr_start;
667 ah->ts_paddr_end = ts_paddr_start + (size * sizeof(struct ar9003_txs));
668 ah->ts_size = size;
669 ah->ts_ring = (struct ar9003_txs *) ts_start;
670
672}
void ath9k_hw_reset_txstatus_ring(struct ath_hw *ah)
uint16_t size
Buffer size.
Definition dwmac.h:3

References ah, ath9k_hw_reset_txstatus_ring(), size, u32, and u8.

Variable Documentation

◆ ds_info

u32 ds_info

Definition at line 0 of file ar9003_mac.h.

◆ status1

u32 status1

Definition at line 1 of file ar9003_mac.h.

Referenced by txnic_lmac_diag(), and txnic_lmac_update_link().

◆ status2

u32 status2

Definition at line 2 of file ar9003_mac.h.

Referenced by txnic_lmac_diag().

◆ status3

u32 status3

Definition at line 3 of file ar9003_mac.h.

◆ status4

u32 status4

Definition at line 4 of file ar9003_mac.h.

◆ status5

u32 status5

Definition at line 5 of file ar9003_mac.h.

◆ status6

u32 status6

Definition at line 6 of file ar9003_mac.h.

◆ status7

u32 status7

Definition at line 7 of file ar9003_mac.h.

◆ status8

u32 status8

Definition at line 8 of file ar9003_mac.h.

◆ status9

u32 status9

Definition at line 9 of file ar9003_mac.h.

◆ status10

u32 status10

Definition at line 10 of file ar9003_mac.h.

◆ status11

u32 status11

Definition at line 11 of file ar9003_mac.h.

◆ info

◆ link

◆ data0

◆ ctl3

u32 ctl3

Definition at line 3 of file ar9003_mac.h.

◆ data1

◆ ctl5

u32 ctl5

Definition at line 5 of file ar9003_mac.h.

◆ data2

◆ ctl7

u32 ctl7

Definition at line 7 of file ar9003_mac.h.

◆ data3

u32 data3

Definition at line 8 of file ar9003_mac.h.

◆ ctl9

u32 ctl9

Definition at line 9 of file ar9003_mac.h.

◆ ctl10

u32 ctl10

Definition at line 10 of file ar9003_mac.h.

◆ ctl11

u32 ctl11

Definition at line 11 of file ar9003_mac.h.

Referenced by ar9003_hw_set11n_ratescenario().

◆ ctl12

u32 ctl12

Definition at line 12 of file ar9003_mac.h.

◆ ctl13

u32 ctl13

Definition at line 13 of file ar9003_mac.h.

◆ ctl14

u32 ctl14

Definition at line 14 of file ar9003_mac.h.

◆ ctl15

u32 ctl15

Definition at line 15 of file ar9003_mac.h.

◆ ctl16

u32 ctl16

Definition at line 16 of file ar9003_mac.h.

◆ ctl17

u32 ctl17

Definition at line 17 of file ar9003_mac.h.

Referenced by ar9003_hw_set11n_aggr_first(), and ar9003_hw_set11n_aggr_middle().

◆ ctl18

u32 ctl18

Definition at line 18 of file ar9003_mac.h.

◆ ctl19

u32 ctl19

Definition at line 19 of file ar9003_mac.h.

◆ ctl20

u32 ctl20

Definition at line 20 of file ar9003_mac.h.

◆ ctl21

u32 ctl21

Definition at line 21 of file ar9003_mac.h.

◆ ctl22

u32 ctl22

Definition at line 22 of file ar9003_mac.h.

◆ pad