aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb/usbnet.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/usb/usbnet.h')
-rw-r--r--include/linux/usb/usbnet.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
index 5d44059f6d63..bb69e256cd16 100644
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -42,7 +42,6 @@ struct usbnet {
42 42
43 /* protocol/interface state */ 43 /* protocol/interface state */
44 struct net_device *net; 44 struct net_device *net;
45 struct net_device_stats stats;
46 int msg_enable; 45 int msg_enable;
47 unsigned long data [5]; 46 unsigned long data [5];
48 u32 xid; 47 u32 xid;
@@ -54,6 +53,7 @@ struct usbnet {
54 struct sk_buff_head rxq; 53 struct sk_buff_head rxq;
55 struct sk_buff_head txq; 54 struct sk_buff_head txq;
56 struct sk_buff_head done; 55 struct sk_buff_head done;
56 struct sk_buff_head rxq_pause;
57 struct urb *interrupt; 57 struct urb *interrupt;
58 struct tasklet_struct bh; 58 struct tasklet_struct bh;
59 59
@@ -64,6 +64,7 @@ struct usbnet {
64# define EVENT_RX_MEMORY 2 64# define EVENT_RX_MEMORY 2
65# define EVENT_STS_SPLIT 3 65# define EVENT_STS_SPLIT 3
66# define EVENT_LINK_RESET 4 66# define EVENT_LINK_RESET 4
67# define EVENT_RX_PAUSED 5
67}; 68};
68 69
69static inline struct usb_driver *driver_of(struct usb_interface *intf) 70static inline struct usb_driver *driver_of(struct usb_interface *intf)
@@ -87,6 +88,7 @@ struct driver_info {
87 88
88#define FLAG_FRAMING_AX 0x0040 /* AX88772/178 packets */ 89#define FLAG_FRAMING_AX 0x0040 /* AX88772/178 packets */
89#define FLAG_WLAN 0x0080 /* use "wlan%d" names */ 90#define FLAG_WLAN 0x0080 /* use "wlan%d" names */
91#define FLAG_AVOID_UNLINK_URBS 0x0100 /* don't unlink urbs at usbnet_stop() */
90 92
91 93
92 /* init device ... can sleep, or cause probe() failure */ 94 /* init device ... can sleep, or cause probe() failure */
@@ -98,6 +100,9 @@ struct driver_info {
98 /* reset device ... can sleep */ 100 /* reset device ... can sleep */
99 int (*reset)(struct usbnet *); 101 int (*reset)(struct usbnet *);
100 102
103 /* stop device ... can sleep */
104 int (*stop)(struct usbnet *);
105
101 /* see if peer is connected ... can sleep */ 106 /* see if peer is connected ... can sleep */
102 int (*check_connect)(struct usbnet *); 107 int (*check_connect)(struct usbnet *);
103 108
@@ -119,9 +124,8 @@ struct driver_info {
119 * right after minidriver have initialized hardware. */ 124 * right after minidriver have initialized hardware. */
120 int (*early_init)(struct usbnet *dev); 125 int (*early_init)(struct usbnet *dev);
121 126
122 /* called by minidriver when link state changes, state: 0=disconnect, 127 /* called by minidriver when receiving indication */
123 * 1=connect */ 128 void (*indication)(struct usbnet *dev, void *ind, int indlen);
124 void (*link_change)(struct usbnet *dev, int state);
125 129
126 /* for new devices, use the descriptor-reading code instead */ 130 /* for new devices, use the descriptor-reading code instead */
127 int in; /* rx endpoint */ 131 int in; /* rx endpoint */
@@ -178,7 +182,8 @@ struct skb_data { /* skb->cb is one of these */
178 182
179extern int usbnet_open (struct net_device *net); 183extern int usbnet_open (struct net_device *net);
180extern int usbnet_stop (struct net_device *net); 184extern int usbnet_stop (struct net_device *net);
181extern int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net); 185extern netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
186 struct net_device *net);
182extern void usbnet_tx_timeout (struct net_device *net); 187extern void usbnet_tx_timeout (struct net_device *net);
183extern int usbnet_change_mtu (struct net_device *net, int new_mtu); 188extern int usbnet_change_mtu (struct net_device *net, int new_mtu);
184 189
@@ -188,6 +193,10 @@ extern void usbnet_defer_kevent (struct usbnet *, int);
188extern void usbnet_skb_return (struct usbnet *, struct sk_buff *); 193extern void usbnet_skb_return (struct usbnet *, struct sk_buff *);
189extern void usbnet_unlink_rx_urbs(struct usbnet *); 194extern void usbnet_unlink_rx_urbs(struct usbnet *);
190 195
196extern void usbnet_pause_rx(struct usbnet *);
197extern void usbnet_resume_rx(struct usbnet *);
198extern void usbnet_purge_paused_rxq(struct usbnet *);
199
191extern int usbnet_get_settings (struct net_device *net, struct ethtool_cmd *cmd); 200extern int usbnet_get_settings (struct net_device *net, struct ethtool_cmd *cmd);
192extern int usbnet_set_settings (struct net_device *net, struct ethtool_cmd *cmd); 201extern int usbnet_set_settings (struct net_device *net, struct ethtool_cmd *cmd);
193extern u32 usbnet_get_link (struct net_device *net); 202extern u32 usbnet_get_link (struct net_device *net);