19#ifndef __DC_NET_BROADBAND_ADAPTER_H
20#define __DC_NET_BROADBAND_ADAPTER_H
61#define RT_TXSTATUS0 0x10
62#define RT_TXSTATUS1 0x14
63#define RT_TXSTATUS2 0x18
64#define RT_TXSTATUS3 0x1C
65#define RT_TXADDR0 0x20
66#define RT_TXADDR1 0x24
67#define RT_TXADDR2 0x28
68#define RT_TXADDR3 0x2C
70#define RT_RXEARLYCNT 0x34
71#define RT_RXEARLYSTATUS 0x36
72#define RT_CHIPCMD 0x37
73#define RT_RXBUFTAIL 0x38
74#define RT_RXBUFHEAD 0x3A
75#define RT_INTRMASK 0x3C
76#define RT_INTRSTATUS 0x3E
77#define RT_TXCONFIG 0x40
78#define RT_RXCONFIG 0x44
80#define RT_RXMISSED 0x4C
81#define RT_CFG9346 0x50
82#define RT_CONFIG0 0x51
83#define RT_CONFIG1 0x52
85#define RT_TIMERINT 0x54
86#define RT_MEDIASTATUS 0x58
87#define RT_CONFIG3 0x59
88#define RT_CONFIG4 0x5A
90#define RT_MULTIINTR 0x5C
93#define RT_MII_TSAD 0x60
94#define RT_MII_BMCR 0x62
95#define RT_MII_BMSR 0x64
96#define RT_AS_ADVERT 0x66
97#define RT_AS_LPAR 0x68
98#define RT_AS_EXPANSION 0x6A
100#define RT_CONFIG5 0xD8
112#define RT_MII_RESET 0x8000
113#define RT_MII_RES4000 0x4000
114#define RT_MII_SPD_SET 0x2000
115#define RT_MII_AN_ENABLE 0x1000
116#define RT_MII_RES0800 0x0800
117#define RT_MII_RES0400 0x0400
118#define RT_MII_AN_START 0x0200
119#define RT_MII_DUPLEX 0x0100
126#define RT_MII_LINK 0x0004
127#define RT_MII_AN_CAPABLE 0x0008
128#define RT_MII_AN_COMPLETE 0x0020
129#define RT_MII_10_HALF 0x0800
130#define RT_MII_10_FULL 0x1000
131#define RT_MII_100_HALF 0x2000
132#define RT_MII_100_FULL 0x4000
143#define RT_CMD_RESET 0x10
144#define RT_CMD_RX_ENABLE 0x08
145#define RT_CMD_TX_ENABLE 0x04
146#define RT_CMD_RX_BUF_EMPTY 0x01
153#define RT_INT_PCIERR 0x8000
154#define RT_INT_TIMEOUT 0x4000
155#define RT_INT_RXFIFO_OVERFLOW 0x0040
156#define RT_INT_RXFIFO_UNDERRUN 0x0020
157#define RT_INT_LINK_CHANGE 0x0020
158#define RT_INT_RXBUF_OVERFLOW 0x0010
159#define RT_INT_TX_ERR 0x0008
160#define RT_INT_TX_OK 0x0004
161#define RT_INT_RX_ERR 0x0002
162#define RT_INT_RX_OK 0x0001
165#define RT_INT_RX_ACK (RT_INT_RXFIFO_OVERFLOW | RT_INT_RXBUF_OVERFLOW | RT_INT_RX_OK)
172#define RT_TX_CARRIER_LOST 0x80000000
173#define RT_TX_ABORTED 0x40000000
174#define RT_TX_OUT_OF_WINDOW 0x20000000
175#define RT_TX_STATUS_OK 0x00008000
176#define RT_TX_UNDERRUN 0x00004000
177#define RT_TX_HOST_OWNS 0x00002000
178#define RT_TX_SIZE_MASK 0x00001fff
185#define RT_RX_MULTICAST 0x8000
186#define RT_RX_PAM 0x4000
187#define RT_RX_BROADCAST 0x2000
188#define RT_RX_BAD_SYMBOL 0x0020
189#define RT_RX_RUNT 0x0010
190#define RT_RX_TOO_LONG 0x0008
191#define RT_RX_CRC_ERR 0x0004
192#define RT_RX_FRAME_ALIGN 0x0002
193#define RT_RX_STATUS_OK 0x0001
202#define RT_ERTH(n) ((n) <<24)
204#define RT_RXC_MulERINT 0x00020000
205#define RT_RXC_RER8 0x00010000
206#define RT_RXC_RXFTH(n) ((n) <<13)
207#define RT_RXC_RBLEN(n) ((n) <<11)
208#define RT_RXC_MXDMA(n) ((n) << 8)
210#define RT_RXC_WRAP 0x00000080
211#define RT_RXC_9356SEL 0x00000040
212#define RT_RXC_AER 0x00000020
213#define RT_RXC_AR 0x00000010
214#define RT_RXC_AB 0x00000008
215#define RT_RXC_AM 0x00000004
216#define RT_RXC_APM 0x00000002
217#define RT_RXC_AAP 0x00000001
227#define RT_CONFIG1_LED1 0x80
228#define RT_CONFIG1_LED0 0x40
229#define RT_CONFIG1_DVRLOAD 0x20
230#define RT_CONFIG1_LWACT 0x10
231#define RT_CONFIG1_MEMMAP 0x08
232#define RT_CONFIG1_IOMAP 0x04
233#define RT_CONFIG1_VPD 0x02
234#define RT_CONFIG1_PMEn 0x01
244#define RT_CONFIG4_RxFIFIOAC 0x80
245#define RT_CONFIG4_AnaOff 0x40
246#define RT_CONFIG4_LongWF 0x20
247#define RT_CONFIG4_LWPME 0x10
248#define RT_CONFIG4_RES08 0x08
249#define RT_CONFIG4_LWPTN 0x04
250#define RT_CONFIG4_RES02 0x02
251#define RT_CONFIG4_PBWake 0x01
261#define RT_CONFIG5_RES80 0x80
262#define RT_CONFIG5_BWF 0x40
263#define RT_CONFIG5_MWF 0x20
264#define RT_CONFIG5_UWF 0x10
265#define RT_CONFIG5_FIFOAddr 0x08
266#define RT_CONFIG5_LDPS 0x04
267#define RT_CONFIG5_LANW 0x02
268#define RT_CONFIG5_PME_STS 0x01
320#define BBA_TX_ERROR -1
321#define BBA_TX_AGAIN -2
328#define BBA_TX_NOWAIT 0
356int bba_shutdown(
void);
void bba_set_rx_callback(eth_rx_callback_t cb)
Set the ethernet packet receive callback.
void(* eth_rx_callback_t)(uint8 *pkt, int len)
Receive packet callback function type.
Definition broadband_adapter.h:297
int bba_tx(const uint8 *pkt, int len, int wait)
Transmit a single packet.
void bba_get_mac(uint8 *arr)
Retrieve the MAC Address of the attached BBA.
unsigned char uint8
8-bit unsigned integer
Definition types.h:35