1 /* $Id: scc.h,v 1.29 1997/04/02 14:56:45 jreuter Exp jreuter $ */
5 #include <uapi/linux/scc.h>
8 enum {TX_OFF
, TX_ON
}; /* command for scc_key_trx() */
10 /* Vector masks in RR2B */
12 #define VECTOR_MASK 0x06
18 #ifdef CONFIG_SCC_DELAY
19 #define Inb(port) inb_p(port)
20 #define Outb(port, val) outb_p(val, port)
22 #define Inb(port) inb(port)
23 #define Outb(port, val) outb(val, port)
26 /* SCC channel control structure for KISS */
29 unsigned char txdelay
; /* Transmit Delay 10 ms/cnt */
30 unsigned char persist
; /* Persistence (0-255) as a % */
31 unsigned char slottime
; /* Delay to wait on persistence hit */
32 unsigned char tailtime
; /* Delay after last byte written */
33 unsigned char fulldup
; /* Full Duplex mode 0=CSMA 1=DUP 2=ALWAYS KEYED */
34 unsigned char waittime
; /* Waittime before any transmit attempt */
35 unsigned int maxkeyup
; /* Maximum time to transmit (seconds) */
36 unsigned int mintime
; /* Minimal offtime after MAXKEYUP timeout (seconds) */
37 unsigned int idletime
; /* Maximum idle time in ALWAYS KEYED mode (seconds) */
38 unsigned int maxdefer
; /* Timer for CSMA channel busy limit */
39 unsigned char tx_inhibit
; /* Transmit is not allowed when set */
40 unsigned char group
; /* Group ID for AX.25 TX interlocking */
41 unsigned char mode
; /* 'normal' or 'hwctrl' mode (unused) */
42 unsigned char softdcd
; /* Use DPLL instead of DCD pin for carrier detect */
46 /* SCC channel structure */
49 int init
; /* channel exists? */
51 struct net_device
*dev
; /* link to device control structure */
52 struct net_device_stats dev_stat
;/* device statistics */
54 char brand
; /* manufacturer of the board */
55 long clock
; /* used clock */
57 io_port ctrl
; /* I/O address of CONTROL register */
58 io_port data
; /* I/O address of DATA register */
59 io_port special
; /* I/O address of special function port */
60 int irq
; /* Number of Interrupt */
63 char enhanced
; /* Enhanced SCC support */
65 unsigned char wreg
[16]; /* Copy of last written value in WRx */
66 unsigned char status
; /* Copy of R0 at last external interrupt */
67 unsigned char dcd
; /* DCD status */
69 struct scc_kiss kiss
; /* control structure for KISS params */
70 struct scc_stat stat
; /* statistical information */
71 struct scc_modem modem
; /* modem information */
73 struct sk_buff_head tx_queue
; /* next tx buffer */
74 struct sk_buff
*rx_buff
; /* pointer to frame currently received */
75 struct sk_buff
*tx_buff
; /* pointer to frame currently transmitted */
78 struct timer_list tx_t
; /* tx timer for this channel */
79 struct timer_list tx_wdog
; /* tx watchdogs */
82 spinlock_t lock
; /* Channel guard lock */
85 #endif /* defined(_SCC_H) */