2 * Copyright 1996 The Australian National University.
3 * Copyright 1996 Fujitsu Laboratories Limited
5 * This software may be distributed under the terms of the Gnu
6 * Public License version 2 or later
9 * Definitions of MAC state structures etc.
13 TimerTwosComplement tmax
;
14 TimerTwosComplement tvx
;
15 TimerTwosComplement treq
;
16 ShortAddressType s_address
;
17 LongAddressType l_address
;
18 ShortAddressType s_group_adrs
;
19 LongAddressType l_group_adrs
;
36 int mac_xmit_space(void);
37 void mac_xmit_alloc(struct mac_buf
*, int);
38 void mac_queue_frame(struct mac_buf
*);
39 int mac_recv_frame(struct mac_buf
*);
40 void mac_discard_frame(struct mac_buf
*);
41 int mac_init(struct mac_info
*mip
);
42 int mac_inited(struct mac_info
*mip
);
43 void mac_reset(LoopbackType loopback
);
47 void mac_disable(void);
48 void mac_make_spframes(void);
49 int mac_xalloc(int nwords
);
50 int mac_xmit_dma(struct sk_buff
*skb
);
51 void mac_dma_complete(void);
52 void mac_process(void);
53 int mac_queue_append(struct sk_buff
*skb
);
56 int cmd
; /* cmd << 16 + size */
57 int st
; /* status << 16 + current size */
58 int hskip
; /* hskip << 16 + hcnt */
59 int vskip
; /* vskip << 16 + vcnt */
60 unsigned char *maddr
; /* memory address */
61 unsigned char *cmaddr
; /* current memory address */
62 int ccount
; /* h_count << 16 + v_count */
63 int *tblp
; /* table pointer */
64 int *ctblp
; /* current table pointer */
65 unsigned char *hdptr
; /* header pointer */
68 #define ROUND4(x) (((x) + 3) & -4)
69 #define ROUND8(x) (((x) + 7) & -8)
70 #define ROUND16(x) (((x) + 15) & -16)
71 #define ROUNDLINE(x) ROUND16(x)
73 #define NWORDS(x) (((x) + 3) >> 2)
74 #define NLINES(x) (((x) + 15) >> 4)
77 * Queue element used to queue transmit requests on the FDDI.
80 volatile struct mac_queue
*next
;