The DLCI driver (dlci.c) implements the Frame Relay protocol. However, we already have another newer and better implementation of Frame Relay provided by the HDLC_FR driver (hdlc_fr.c). The DLCI driver's implementation of Frame Relay is used by only one hardware driver in the kernel - the SDLA driver (sdla.c). The SDLA driver provides Frame Relay support for the Sangoma S50x devices. However, the vendor provides their own driver (along with their own multi-WAN-protocol implementations including Frame Relay), called WANPIPE. I believe most users of the hardware would use the vendor-provided WANPIPE driver instead. (The WANPIPE driver was even once in the kernel, but was deleted in commit 8db60bcf3021 ("[WAN]: Remove broken and unmaintained Sangoma drivers.") because the vendor no longer updated the in-kernel WANPIPE driver.)
Showing the changes to include/uapi (2 of 15 files). Show all
Unified · Split
| @@ -1,123 +0,0 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * DLCI/FRAD Definitions for Frame Relay Access Devices. DLCI devices are | ||
| 4 | * created for each DLCI associated with a FRAD. The FRAD driver | ||
| 5 | * is not truly a network device, but the lower level device | ||
| 6 | * handler. This allows other FRAD manufacturers to use the DLCI | ||
| 7 | * code, including its RFC1490 encapsulation alongside the current | ||
| 8 | * implementation for the Sangoma cards. | ||
| 9 | * | ||
| 10 | * Version: @(#)if_ifrad.h 0.15 31 Mar 96 | ||
| 11 | * | ||
| 12 | * Author: Mike McLagan <mike.mclagan@linux.org> | ||
| 13 | * | ||
| 14 | * Changes: | ||
| 15 | * 0.15 Mike McLagan changed structure defs (packed) | ||
| 16 | * re-arranged flags | ||
| 17 | * added DLCI_RET vars | ||
| 18 | * | ||
| 19 | * This program is free software; you can redistribute it and/or | ||
| 20 | * modify it under the terms of the GNU General Public License | ||
| 21 | * as published by the Free Software Foundation; either version | ||
| 22 | * 2 of the License, or (at your option) any later version. | ||
| 23 | */ | ||
| 24 | |||
| 25 | #ifndef _UAPI_FRAD_H_ | ||
| 26 | #define _UAPI_FRAD_H_ | ||
| 27 | |||
| 28 | #include <linux/if.h> | ||
| 29 | |||
| 30 | /* Structures and constants associated with the DLCI device driver */ | ||
| 31 | |||
| 32 | struct dlci_add | ||
| 33 | { | ||
| 34 | char devname[IFNAMSIZ]; | ||
| 35 | short dlci; | ||
| 36 | }; | ||
| 37 | |||
| 38 | #define DLCI_GET_CONF (SIOCDEVPRIVATE + 2) | ||
| 39 | #define DLCI_SET_CONF (SIOCDEVPRIVATE + 3) | ||
| 40 | |||
| 41 | /* | ||
| 42 | * These are related to the Sangoma SDLA and should remain in order. | ||
| 43 | * Code within the SDLA module is based on the specifics of this | ||
| 44 | * structure. Change at your own peril. | ||
| 45 | */ | ||
| 46 | struct dlci_conf { | ||
| 47 | short flags; | ||
| 48 | short CIR_fwd; | ||
| 49 | short Bc_fwd; | ||
| 50 | short Be_fwd; | ||
| 51 | short CIR_bwd; | ||
| 52 | short Bc_bwd; | ||
| 53 | short Be_bwd; | ||
| 54 | |||
| 55 | /* these are part of the status read */ | ||
| 56 | short Tc_fwd; | ||
| 57 | short Tc_bwd; | ||
| 58 | short Tf_max; | ||
| 59 | short Tb_max; | ||
| 60 | |||
| 61 | /* add any new fields here above is a mirror of sdla_dlci_conf */ | ||
| 62 | }; | ||
| 63 | |||
| 64 | #define DLCI_GET_SLAVE (SIOCDEVPRIVATE + 4) | ||
| 65 | |||
| 66 | /* configuration flags for DLCI */ | ||
| 67 | #define DLCI_IGNORE_CIR_OUT 0x0001 | ||
| 68 | #define DLCI_ACCOUNT_CIR_IN 0x0002 | ||
| 69 | #define DLCI_BUFFER_IF 0x0008 | ||
| 70 | |||
| 71 | #define DLCI_VALID_FLAGS 0x000B | ||
| 72 | |||
| 73 | /* defines for the actual Frame Relay hardware */ | ||
| 74 | #define FRAD_GET_CONF (SIOCDEVPRIVATE) | ||
| 75 | #define FRAD_SET_CONF (SIOCDEVPRIVATE + 1) | ||
| 76 | |||
| 77 | #define FRAD_LAST_IOCTL FRAD_SET_CONF | ||
| 78 | |||
| 79 | /* | ||
| 80 | * Based on the setup for the Sangoma SDLA. If changes are | ||
| 81 | * necessary to this structure, a routine will need to be | ||
| 82 | * added to that module to copy fields. | ||
| 83 | */ | ||
| 84 | struct frad_conf | ||
| 85 | { | ||
| 86 | short station; | ||
| 87 | short flags; | ||
| 88 | short kbaud; | ||
| 89 | short clocking; | ||
| 90 | short mtu; | ||
| 91 | short T391; | ||
| 92 | short T392; | ||
| 93 | short N391; | ||
| 94 | short N392; | ||
| 95 | short N393; | ||
| 96 | short CIR_fwd; | ||
| 97 | short Bc_fwd; | ||
| 98 | short Be_fwd; | ||
| 99 | short CIR_bwd; | ||
| 100 | short Bc_bwd; | ||
| 101 | short Be_bwd; | ||
| 102 | |||
| 103 | /* Add new fields here, above is a mirror of the sdla_conf */ | ||
| 104 | |||
| 105 | }; | ||
| 106 | |||
| 107 | #define FRAD_STATION_CPE 0x0000 | ||
| 108 | #define FRAD_STATION_NODE 0x0001 | ||
| 109 | |||
| 110 | #define FRAD_TX_IGNORE_CIR 0x0001 | ||
| 111 | #define FRAD_RX_ACCOUNT_CIR 0x0002 | ||
| 112 | #define FRAD_DROP_ABORTED 0x0004 | ||
| 113 | #define FRAD_BUFFERIF 0x0008 | ||
| 114 | #define FRAD_STATS 0x0010 | ||
| 115 | #define FRAD_MCI 0x0100 | ||
| 116 | #define FRAD_AUTODLCI 0x8000 | ||
| 117 | #define FRAD_VALID_FLAGS 0x811F | ||
| 118 | |||
| 119 | #define FRAD_CLOCK_INT 0x0001 | ||
| 120 | #define FRAD_CLOCK_EXT 0x0000 | ||
| 121 | |||
| 122 | |||
| 123 | #endif /* _UAPI_FRAD_H_ */ | ||
| @@ -1,117 +0,0 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * INET An implementation of the TCP/IP protocol suite for the LINUX | ||
| 4 | * operating system. INET is implemented using the BSD Socket | ||
| 5 | * interface as the means of communication with the user level. | ||
| 6 | * | ||
| 7 | * Global definitions for the Frame relay interface. | ||
| 8 | * | ||
| 9 | * Version: @(#)if_ifrad.h 0.20 13 Apr 96 | ||
| 10 | * | ||
| 11 | * Author: Mike McLagan <mike.mclagan@linux.org> | ||
| 12 | * | ||
| 13 | * Changes: | ||
| 14 | * 0.15 Mike McLagan Structure packing | ||
| 15 | * | ||
| 16 | * 0.20 Mike McLagan New flags for S508 buffer handling | ||
| 17 | * | ||
| 18 | * This program is free software; you can redistribute it and/or | ||
| 19 | * modify it under the terms of the GNU General Public License | ||
| 20 | * as published by the Free Software Foundation; either version | ||
| 21 | * 2 of the License, or (at your option) any later version. | ||
| 22 | */ | ||
| 23 | |||
| 24 | #ifndef _UAPISDLA_H | ||
| 25 | #define _UAPISDLA_H | ||
| 26 | |||
| 27 | /* adapter type */ | ||
| 28 | #define SDLA_TYPES | ||
| 29 | #define SDLA_S502A 5020 | ||
| 30 | #define SDLA_S502E 5021 | ||
| 31 | #define SDLA_S503 5030 | ||
| 32 | #define SDLA_S507 5070 | ||
| 33 | #define SDLA_S508 5080 | ||
| 34 | #define SDLA_S509 5090 | ||
| 35 | #define SDLA_UNKNOWN -1 | ||
| 36 | |||
| 37 | /* port selection flags for the S508 */ | ||
| 38 | #define SDLA_S508_PORT_V35 0x00 | ||
| 39 | #define SDLA_S508_PORT_RS232 0x02 | ||
| 40 | |||
| 41 | /* Z80 CPU speeds */ | ||
| 42 | #define SDLA_CPU_3M 0x00 | ||
| 43 | #define SDLA_CPU_5M 0x01 | ||
| 44 | #define SDLA_CPU_7M 0x02 | ||
| 45 | #define SDLA_CPU_8M 0x03 | ||
| 46 | #define SDLA_CPU_10M 0x04 | ||
| 47 | #define SDLA_CPU_16M 0x05 | ||
| 48 | #define SDLA_CPU_12M 0x06 | ||
| 49 | |||
| 50 | /* some private IOCTLs */ | ||
| 51 | #define SDLA_IDENTIFY (FRAD_LAST_IOCTL + 1) | ||
| 52 | #define SDLA_CPUSPEED (FRAD_LAST_IOCTL + 2) | ||
| 53 | #define SDLA_PROTOCOL (FRAD_LAST_IOCTL + 3) | ||
| 54 | |||
| 55 | #define SDLA_CLEARMEM (FRAD_LAST_IOCTL + 4) | ||
| 56 | #define SDLA_WRITEMEM (FRAD_LAST_IOCTL + 5) | ||
| 57 | #define SDLA_READMEM (FRAD_LAST_IOCTL + 6) | ||
| 58 | |||
| 59 | struct sdla_mem { | ||
| 60 | int addr; | ||
| 61 | int len; | ||
| 62 | void __user *data; | ||
| 63 | }; | ||
| 64 | |||
| 65 | #define SDLA_START (FRAD_LAST_IOCTL + 7) | ||
| 66 | #define SDLA_STOP (FRAD_LAST_IOCTL + 8) | ||
| 67 | |||
| 68 | /* some offsets in the Z80's memory space */ | ||
| 69 | #define SDLA_NMIADDR 0x0000 | ||
| 70 | #define SDLA_CONF_ADDR 0x0010 | ||
| 71 | #define SDLA_S502A_NMIADDR 0x0066 | ||
| 72 | #define SDLA_CODE_BASEADDR 0x0100 | ||
| 73 | #define SDLA_WINDOW_SIZE 0x2000 | ||
| 74 | #define SDLA_ADDR_MASK 0x1FFF | ||
| 75 | |||
| 76 | /* largest handleable block of data */ | ||
| 77 | #define SDLA_MAX_DATA 4080 | ||
| 78 | #define SDLA_MAX_MTU 4072 /* MAX_DATA - sizeof(fradhdr) */ | ||
| 79 | #define SDLA_MAX_DLCI 24 | ||
| 80 | |||
| 81 | /* this should be the same as frad_conf */ | ||
| 82 | struct sdla_conf { | ||
| 83 | short station; | ||
| 84 | short config; | ||
| 85 | short kbaud; | ||
| 86 | short clocking; | ||
| 87 | short max_frm; | ||
| 88 | short T391; | ||
| 89 | short T392; | ||
| 90 | short N391; | ||
| 91 | short N392; | ||
| 92 | short N393; | ||
| 93 | short CIR_fwd; | ||
| 94 | short Bc_fwd; | ||
| 95 | short Be_fwd; | ||
| 96 | short CIR_bwd; | ||
| 97 | short Bc_bwd; | ||
| 98 | short Be_bwd; | ||
| 99 | }; | ||
| 100 | |||
| 101 | /* this should be the same as dlci_conf */ | ||
| 102 | struct sdla_dlci_conf { | ||
| 103 | short config; | ||
| 104 | short CIR_fwd; | ||
| 105 | short Bc_fwd; | ||
| 106 | short Be_fwd; | ||
| 107 | short CIR_bwd; | ||
| 108 | short Bc_bwd; | ||
| 109 | short Be_bwd; | ||
| 110 | short Tc_fwd; | ||
| 111 | short Tc_bwd; | ||
| 112 | short Tf_max; | ||
| 113 | short Tb_max; | ||
| 114 | }; | ||
| 115 | |||
| 116 | |||
| 117 | #endif /* _UAPISDLA_H */ | ||