]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - include/uapi/linux/hdlcdrv.h
Merge tag 'fixes-for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm...
[mirror_ubuntu-bionic-kernel.git] / include / uapi / linux / hdlcdrv.h
1 /*
2 * hdlcdrv.h -- HDLC packet radio network driver.
3 * The Linux soundcard driver for 1200 baud and 9600 baud packet radio
4 * (C) 1996-1998 by Thomas Sailer, HB9JNX/AE4WA
5 */
6
7 #ifndef _UAPI_HDLCDRV_H
8 #define _UAPI_HDLCDRV_H
9
10 /* -------------------------------------------------------------------- */
11 /*
12 * structs for the IOCTL commands
13 */
14
15 struct hdlcdrv_params {
16 int iobase;
17 int irq;
18 int dma;
19 int dma2;
20 int seriobase;
21 int pariobase;
22 int midiiobase;
23 };
24
25 struct hdlcdrv_channel_params {
26 int tx_delay; /* the transmitter keyup delay in 10ms units */
27 int tx_tail; /* the transmitter keyoff delay in 10ms units */
28 int slottime; /* the slottime in 10ms; usually 10 = 100ms */
29 int ppersist; /* the p-persistence 0..255 */
30 int fulldup; /* some driver do not support full duplex, setting */
31 /* this just makes them send even if DCD is on */
32 };
33
34 struct hdlcdrv_old_channel_state {
35 int ptt;
36 int dcd;
37 int ptt_keyed;
38 };
39
40 struct hdlcdrv_channel_state {
41 int ptt;
42 int dcd;
43 int ptt_keyed;
44 unsigned long tx_packets;
45 unsigned long tx_errors;
46 unsigned long rx_packets;
47 unsigned long rx_errors;
48 };
49
50 struct hdlcdrv_ioctl {
51 int cmd;
52 union {
53 struct hdlcdrv_params mp;
54 struct hdlcdrv_channel_params cp;
55 struct hdlcdrv_channel_state cs;
56 struct hdlcdrv_old_channel_state ocs;
57 unsigned int calibrate;
58 unsigned char bits;
59 char modename[128];
60 char drivername[32];
61 } data;
62 };
63
64 /* -------------------------------------------------------------------- */
65
66 /*
67 * ioctl values
68 */
69 #define HDLCDRVCTL_GETMODEMPAR 0
70 #define HDLCDRVCTL_SETMODEMPAR 1
71 #define HDLCDRVCTL_MODEMPARMASK 2 /* not handled by hdlcdrv */
72 #define HDLCDRVCTL_GETCHANNELPAR 10
73 #define HDLCDRVCTL_SETCHANNELPAR 11
74 #define HDLCDRVCTL_OLDGETSTAT 20
75 #define HDLCDRVCTL_CALIBRATE 21
76 #define HDLCDRVCTL_GETSTAT 22
77
78 /*
79 * these are mainly for debugging purposes
80 */
81 #define HDLCDRVCTL_GETSAMPLES 30
82 #define HDLCDRVCTL_GETBITS 31
83
84 /*
85 * not handled by hdlcdrv, but by its depending drivers
86 */
87 #define HDLCDRVCTL_GETMODE 40
88 #define HDLCDRVCTL_SETMODE 41
89 #define HDLCDRVCTL_MODELIST 42
90 #define HDLCDRVCTL_DRIVERNAME 43
91
92 /*
93 * mask of needed modem parameters, returned by HDLCDRVCTL_MODEMPARMASK
94 */
95 #define HDLCDRV_PARMASK_IOBASE (1<<0)
96 #define HDLCDRV_PARMASK_IRQ (1<<1)
97 #define HDLCDRV_PARMASK_DMA (1<<2)
98 #define HDLCDRV_PARMASK_DMA2 (1<<3)
99 #define HDLCDRV_PARMASK_SERIOBASE (1<<4)
100 #define HDLCDRV_PARMASK_PARIOBASE (1<<5)
101 #define HDLCDRV_PARMASK_MIDIIOBASE (1<<6)
102
103 /* -------------------------------------------------------------------- */
104
105
106 /* -------------------------------------------------------------------- */
107
108 #endif /* _UAPI_HDLCDRV_H */
109
110 /* -------------------------------------------------------------------- */