0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef AR9003_MAC_H
0018 #define AR9003_MAC_H
0019
0020 #define AR_DescId 0xffff0000
0021 #define AR_DescId_S 16
0022 #define AR_CtrlStat 0x00004000
0023 #define AR_CtrlStat_S 14
0024 #define AR_TxRxDesc 0x00008000
0025 #define AR_TxRxDesc_S 15
0026 #define AR_TxQcuNum 0x00000f00
0027 #define AR_TxQcuNum_S 8
0028
0029 #define AR_BufLen 0x0fff0000
0030 #define AR_BufLen_S 16
0031
0032 #define AR_TxDescId 0xffff0000
0033 #define AR_TxDescId_S 16
0034 #define AR_TxPtrChkSum 0x0000ffff
0035
0036 #define AR_LowRxChain 0x00004000
0037
0038 #define AR_Not_Sounding 0x20000000
0039
0040
0041 #define AR_PAPRDChainMask 0x00000e00
0042 #define AR_PAPRDChainMask_S 9
0043
0044 #define MAP_ISR_S2_CST 6
0045 #define MAP_ISR_S2_GTT 6
0046 #define MAP_ISR_S2_TIM 3
0047 #define MAP_ISR_S2_CABEND 0
0048 #define MAP_ISR_S2_DTIMSYNC 7
0049 #define MAP_ISR_S2_DTIM 7
0050 #define MAP_ISR_S2_TSFOOR 4
0051 #define MAP_ISR_S2_BB_WATCHDOG 6
0052
0053 #define AR9003TXC_CONST(_ds) ((const struct ar9003_txc *) _ds)
0054
0055 struct ar9003_rxs {
0056 u32 ds_info;
0057 u32 status1;
0058 u32 status2;
0059 u32 status3;
0060 u32 status4;
0061 u32 status5;
0062 u32 status6;
0063 u32 status7;
0064 u32 status8;
0065 u32 status9;
0066 u32 status10;
0067 u32 status11;
0068 } __packed __aligned(4);
0069
0070
0071 struct ar9003_txc {
0072 u32 info;
0073 u32 link;
0074 u32 data0;
0075 u32 ctl3;
0076 u32 data1;
0077 u32 ctl5;
0078 u32 data2;
0079 u32 ctl7;
0080 u32 data3;
0081 u32 ctl9;
0082 u32 ctl10;
0083 u32 ctl11;
0084 u32 ctl12;
0085 u32 ctl13;
0086 u32 ctl14;
0087 u32 ctl15;
0088 u32 ctl16;
0089 u32 ctl17;
0090 u32 ctl18;
0091 u32 ctl19;
0092 u32 ctl20;
0093 u32 ctl21;
0094 u32 ctl22;
0095 u32 ctl23;
0096 u32 pad[8];
0097 } __packed __aligned(4);
0098
0099 struct ar9003_txs {
0100 u32 ds_info;
0101 u32 status1;
0102 u32 status2;
0103 u32 status3;
0104 u32 status4;
0105 u32 status5;
0106 u32 status6;
0107 u32 status7;
0108 u32 status8;
0109 } __packed __aligned(4);
0110
0111 void ar9003_hw_attach_mac_ops(struct ath_hw *hw);
0112 void ath9k_hw_set_rx_bufsize(struct ath_hw *ah, u16 buf_size);
0113 void ath9k_hw_addrxbuf_edma(struct ath_hw *ah, u32 rxdp,
0114 enum ath9k_rx_qtype qtype);
0115
0116 int ath9k_hw_process_rxdesc_edma(struct ath_hw *ah,
0117 struct ath_rx_status *rxs,
0118 void *buf_addr);
0119 void ath9k_hw_reset_txstatus_ring(struct ath_hw *ah);
0120 void ath9k_hw_setup_statusring(struct ath_hw *ah, void *ts_start,
0121 u32 ts_paddr_start,
0122 u16 size);
0123 #endif