18 #ifndef __DC_NET_BROADBAND_ADAPTER_H
19 #define __DC_NET_BROADBAND_ADAPTER_H
21 #include <sys/cdefs.h>
29 #define RT_TXSTATUS0 0x10
30 #define RT_TXADDR0 0x20
32 #define RT_RXEARLYCNT 0x34
33 #define RT_RXEARLYSTATUS 0x36
34 #define RT_CHIPCMD 0x37
35 #define RT_RXBUFTAIL 0x38
36 #define RT_RXBUFHEAD 0x3A
37 #define RT_INTRMASK 0x3C
38 #define RT_INTRSTATUS 0x3E
39 #define RT_TXCONFIG 0x40
40 #define RT_RXCONFIG 0x44
42 #define RT_RXMISSED 0x4C
43 #define RT_CFG9346 0x50
44 #define RT_CONFIG0 0x51
45 #define RT_CONFIG1 0x52
46 #define RT_TIMERINT 0x54
47 #define RT_MEDIASTATUS 0x58
48 #define RT_CONFIG3 0x59
49 #define RT_CONFIG4 0x5A
50 #define RT_MULTIINTR 0x5C
51 #define RT_MII_TSAD 0x60
52 #define RT_MII_BMCR 0x62
53 #define RT_MII_BMSR 0x64
54 #define RT_AS_ADVERT 0x66
55 #define RT_AS_LPAR 0x68
56 #define RT_AS_EXPANSION 0x6A
62 #define RT_MII_AN_START 0x0200
63 #define RT_MII_AN_ENABLE 0x1000
64 #define RT_MII_RESET 0x8000
70 #define RT_MII_LINK 0x0004
71 #define RT_MII_AN_CAPABLE 0x0008
72 #define RT_MII_AN_COMPLETE 0x0020
73 #define RT_MII_10_HALF 0x0800
74 #define RT_MII_10_FULL 0x1000
75 #define RT_MII_100_HALF 0x2000
76 #define RT_MII_100_FULL 0x4000
86 #define RT_CMD_RESET 0x10
87 #define RT_CMD_RX_ENABLE 0x08
88 #define RT_CMD_TX_ENABLE 0x04
89 #define RT_CMD_RX_BUF_EMPTY 0x01
95 #define RT_INT_PCIERR 0x8000
96 #define RT_INT_TIMEOUT 0x4000
97 #define RT_INT_RXFIFO_OVERFLOW 0x0040
98 #define RT_INT_RXFIFO_UNDERRUN 0x0020
99 #define RT_INT_LINK_CHANGE 0x0020
100 #define RT_INT_RXBUF_OVERFLOW 0x0010
101 #define RT_INT_TX_ERR 0x0008
102 #define RT_INT_TX_OK 0x0004
103 #define RT_INT_RX_ERR 0x0002
104 #define RT_INT_RX_OK 0x0001
107 #define RT_INT_RX_ACK (RT_INT_RXFIFO_OVERFLOW | RT_INT_RXBUF_OVERFLOW | RT_INT_RX_OK)
113 #define RT_TX_CARRIER_LOST 0x80000000
114 #define RT_TX_ABORTED 0x40000000
115 #define RT_TX_OUT_OF_WINDOW 0x20000000
116 #define RT_TX_STATUS_OK 0x00008000
117 #define RT_TX_UNDERRUN 0x00004000
118 #define RT_TX_HOST_OWNS 0x00002000
119 #define RT_TX_SIZE_MASK 0x00001fff
125 #define RT_RX_MULTICAST 0x00008000
126 #define RT_RX_PAM 0x00004000
127 #define RT_RX_BROADCAST 0x00002000
128 #define RT_RX_BAD_SYMBOL 0x00000020
129 #define RT_RX_RUNT 0x00000010
130 #define RT_RX_TOO_LONG 0x00000008
131 #define RT_RX_CRC_ERR 0x00000004
132 #define RT_RX_FRAME_ALIGN 0x00000002
133 #define RT_RX_STATUS_OK 0x00000001
168 #define BBA_TX_ERROR -1
169 #define BBA_TX_AGAIN -2
172 #define BBA_TX_NOWAIT 0
173 #define BBA_TX_WAIT 1
void(* eth_rx_callback_t)(uint8 *pkt, int len)
Receive packet callback function type.
Definition: broadband_adapter.h:153
void bba_set_rx_callback(eth_rx_callback_t cb)
Set the ethernet packet receive callback.
unsigned char uint8
8-bit unsigned integer
Definition: types.h:30
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.