1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
3 * hdlcdrv.h -- HDLC packet radio network driver.
4 * The Linux soundcard driver for 1200 baud and 9600 baud packet radio
5 * (C) 1996-1998 by Thomas Sailer, HB9JNX/AE4WA
8 #ifndef _UAPI_HDLCDRV_H
9 #define _UAPI_HDLCDRV_H
11 /* -------------------------------------------------------------------- */
13 * structs for the IOCTL commands
16 struct hdlcdrv_params {
26 struct hdlcdrv_channel_params {
27 int tx_delay; /* the transmitter keyup delay in 10ms units */
28 int tx_tail; /* the transmitter keyoff delay in 10ms units */
29 int slottime; /* the slottime in 10ms; usually 10 = 100ms */
30 int ppersist; /* the p-persistence 0..255 */
31 int fulldup; /* some driver do not support full duplex, setting */
32 /* this just makes them send even if DCD is on */
35 struct hdlcdrv_old_channel_state {
41 struct hdlcdrv_channel_state {
45 unsigned long tx_packets;
46 unsigned long tx_errors;
47 unsigned long rx_packets;
48 unsigned long rx_errors;
51 struct hdlcdrv_ioctl {
54 struct hdlcdrv_params mp;
55 struct hdlcdrv_channel_params cp;
56 struct hdlcdrv_channel_state cs;
57 struct hdlcdrv_old_channel_state ocs;
58 unsigned int calibrate;
65 /* -------------------------------------------------------------------- */
70 #define HDLCDRVCTL_GETMODEMPAR 0
71 #define HDLCDRVCTL_SETMODEMPAR 1
72 #define HDLCDRVCTL_MODEMPARMASK 2 /* not handled by hdlcdrv */
73 #define HDLCDRVCTL_GETCHANNELPAR 10
74 #define HDLCDRVCTL_SETCHANNELPAR 11
75 #define HDLCDRVCTL_OLDGETSTAT 20
76 #define HDLCDRVCTL_CALIBRATE 21
77 #define HDLCDRVCTL_GETSTAT 22
80 * these are mainly for debugging purposes
82 #define HDLCDRVCTL_GETSAMPLES 30
83 #define HDLCDRVCTL_GETBITS 31
86 * not handled by hdlcdrv, but by its depending drivers
88 #define HDLCDRVCTL_GETMODE 40
89 #define HDLCDRVCTL_SETMODE 41
90 #define HDLCDRVCTL_MODELIST 42
91 #define HDLCDRVCTL_DRIVERNAME 43
94 * mask of needed modem parameters, returned by HDLCDRVCTL_MODEMPARMASK
96 #define HDLCDRV_PARMASK_IOBASE (1<<0)
97 #define HDLCDRV_PARMASK_IRQ (1<<1)
98 #define HDLCDRV_PARMASK_DMA (1<<2)
99 #define HDLCDRV_PARMASK_DMA2 (1<<3)
100 #define HDLCDRV_PARMASK_SERIOBASE (1<<4)
101 #define HDLCDRV_PARMASK_PARIOBASE (1<<5)
102 #define HDLCDRV_PARMASK_MIDIIOBASE (1<<6)
104 /* -------------------------------------------------------------------- */
107 /* -------------------------------------------------------------------- */
109 #endif /* _UAPI_HDLCDRV_H */
111 /* -------------------------------------------------------------------- */