crypto: atmel-sha - remove unnecessary static in atmel_sha_remove()
[linux-stable.git] / include / linux / if_frad.h
blob46df7e565d6f88f4b99137b4353bd5046f4f2076
1 /*
2 * DLCI/FRAD Definitions for Frame Relay Access Devices. DLCI devices are
3 * created for each DLCI associated with a FRAD. The FRAD driver
4 * is not truly a network device, but the lower level device
5 * handler. This allows other FRAD manufacturers to use the DLCI
6 * code, including its RFC1490 encapsulation alongside the current
7 * implementation for the Sangoma cards.
9 * Version: @(#)if_ifrad.h 0.15 31 Mar 96
11 * Author: Mike McLagan <mike.mclagan@linux.org>
13 * Changes:
14 * 0.15 Mike McLagan changed structure defs (packed)
15 * re-arranged flags
16 * added DLCI_RET vars
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.
23 #ifndef _FRAD_H_
24 #define _FRAD_H_
26 #include <uapi/linux/if_frad.h>
29 #if defined(CONFIG_DLCI) || defined(CONFIG_DLCI_MODULE)
31 /* these are the fields of an RFC 1490 header */
32 struct frhdr
34 unsigned char control;
36 /* for IP packets, this can be the NLPID */
37 unsigned char pad;
39 unsigned char NLPID;
40 unsigned char OUI[3];
41 __be16 PID;
43 #define IP_NLPID pad
44 } __packed;
46 /* see RFC 1490 for the definition of the following */
47 #define FRAD_I_UI 0x03
49 #define FRAD_P_PADDING 0x00
50 #define FRAD_P_Q933 0x08
51 #define FRAD_P_SNAP 0x80
52 #define FRAD_P_CLNP 0x81
53 #define FRAD_P_IP 0xCC
55 struct dlci_local
57 struct net_device *master;
58 struct net_device *slave;
59 struct dlci_conf config;
60 int configured;
61 struct list_head list;
63 /* callback function */
64 void (*receive)(struct sk_buff *skb, struct net_device *);
67 struct frad_local
69 /* devices which this FRAD is slaved to */
70 struct net_device *master[CONFIG_DLCI_MAX];
71 short dlci[CONFIG_DLCI_MAX];
73 struct frad_conf config;
74 int configured; /* has this device been configured */
75 int initialized; /* mem_start, port, irq set ? */
77 /* callback functions */
78 int (*activate)(struct net_device *, struct net_device *);
79 int (*deactivate)(struct net_device *, struct net_device *);
80 int (*assoc)(struct net_device *, struct net_device *);
81 int (*deassoc)(struct net_device *, struct net_device *);
82 int (*dlci_conf)(struct net_device *, struct net_device *, int get);
84 /* fields that are used by the Sangoma SDLA cards */
85 struct timer_list timer;
86 int type; /* adapter type */
87 int state; /* state of the S502/8 control latch */
88 int buffer; /* current buffer for S508 firmware */
91 #endif /* CONFIG_DLCI || CONFIG_DLCI_MODULE */
93 extern void dlci_ioctl_set(int (*hook)(unsigned int, void __user *));
95 #endif