net/if_clone: Panic if the same cloner is attached twice
[dragonfly.git] / sys / dev / netif / lgue / if_lgue.h
1 /*
2  * Definitions for LG USB CDC
3  */
4
5 #define LGUE_CONFIG_NO          1
6
7 #define LGUE_ALTERNATE_SETTING  1
8
9 #define LGUE_ENDPT_RX           0x0
10 #define LGUE_ENDPT_TX           0x1
11 #define LGUE_ENDPT_INTR         0x2
12 #define LGUE_ENDPT_MAX          0x3
13
14 #define LGUE_BUFSZ              1600
15
16 /*
17  * Internal queue entry
18  */
19 struct lgue_queue_entry {
20         /*
21         int entry_len;
22         char entry_tx_buf[LGUE_BUFSZ];
23         */
24         struct mbuf *entry_mbuf;
25         STAILQ_ENTRY(lgue_queue_entry) entry_next;
26 };
27
28
29 struct lgue_softc {
30         struct arpcom lgue_arpcom;
31         usbd_device_handle              lgue_udev;
32         int lgue_ed[LGUE_ENDPT_MAX];
33         usbd_pipe_handle lgue_ep[LGUE_ENDPT_MAX];
34
35         int lgue_ctl_iface_no;
36         usbd_interface_handle lgue_ctl_iface; /* control interface */
37         int lgue_data_iface_no;
38         usbd_interface_handle lgue_data_iface; /* data interface */
39
40         char lgue_dying;
41         int lgue_if_flags;
42
43         int lgue_tx_cnt;
44         usbd_xfer_handle lgue_tx_xfer;
45         char *lgue_tx_buf;
46
47         int lgue_rx_cnt;
48         usbd_xfer_handle lgue_rx_xfer;
49         struct timeval lgue_rx_notice;
50         char *lgue_rx_buf;
51
52         usbd_xfer_handle lgue_intr_xfer;
53         char *lgue_intr_buf;
54
55         /* Internal queue */
56         STAILQ_HEAD(, lgue_queue_entry) lgue_tx_queue;
57 };