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.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
index 310e18a880ff..bb69e256cd16 100644
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -53,6 +53,7 @@ struct usbnet {
53 struct sk_buff_head rxq; 53 struct sk_buff_head rxq;
54 struct sk_buff_head txq; 54 struct sk_buff_head txq;
55 struct sk_buff_head done; 55 struct sk_buff_head done;
56 struct sk_buff_head rxq_pause;
56 struct urb *interrupt; 57 struct urb *interrupt;
57 struct tasklet_struct bh; 58 struct tasklet_struct bh;
58 59
@@ -63,6 +64,7 @@ struct usbnet {
63# define EVENT_RX_MEMORY 2 64# define EVENT_RX_MEMORY 2
64# define EVENT_STS_SPLIT 3 65# define EVENT_STS_SPLIT 3
65# define EVENT_LINK_RESET 4 66# define EVENT_LINK_RESET 4
67# define EVENT_RX_PAUSED 5
66}; 68};
67 69
68static inline struct usb_driver *driver_of(struct usb_interface *intf) 70static inline struct usb_driver *driver_of(struct usb_interface *intf)
@@ -86,6 +88,7 @@ struct driver_info {
86 88
87#define FLAG_FRAMING_AX 0x0040 /* AX88772/178 packets */ 89#define FLAG_FRAMING_AX 0x0040 /* AX88772/178 packets */
88#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() */
89 92
90 93
91 /* init device ... can sleep, or cause probe() failure */ 94 /* init device ... can sleep, or cause probe() failure */
@@ -97,6 +100,9 @@ struct driver_info {
97 /* reset device ... can sleep */ 100 /* reset device ... can sleep */
98 int (*reset)(struct usbnet *); 101 int (*reset)(struct usbnet *);
99 102
103 /* stop device ... can sleep */
104 int (*stop)(struct usbnet *);
105
100 /* see if peer is connected ... can sleep */ 106 /* see if peer is connected ... can sleep */
101 int (*check_connect)(struct usbnet *); 107 int (*check_connect)(struct usbnet *);
102 108
@@ -118,9 +124,8 @@ struct driver_info {
118 * right after minidriver have initialized hardware. */ 124 * right after minidriver have initialized hardware. */
119 int (*early_init)(struct usbnet *dev); 125 int (*early_init)(struct usbnet *dev);
120 126
121 /* called by minidriver when link state changes, state: 0=disconnect, 127 /* called by minidriver when receiving indication */
122 * 1=connect */ 128 void (*indication)(struct usbnet *dev, void *ind, int indlen);
123 void (*link_change)(struct usbnet *dev, int state);
124 129
125 /* for new devices, use the descriptor-reading code instead */ 130 /* for new devices, use the descriptor-reading code instead */
126 int in; /* rx endpoint */ 131 int in; /* rx endpoint */
@@ -177,7 +182,8 @@ struct skb_data { /* skb->cb is one of these */
177 182
178extern int usbnet_open (struct net_device *net); 183extern int usbnet_open (struct net_device *net);
179extern int usbnet_stop (struct net_device *net); 184extern int usbnet_stop (struct net_device *net);
180extern 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);
181extern void usbnet_tx_timeout (struct net_device *net); 187extern void usbnet_tx_timeout (struct net_device *net);
182extern int usbnet_change_mtu (struct net_device *net, int new_mtu); 188extern int usbnet_change_mtu (struct net_device *net, int new_mtu);
183 189
@@ -187,6 +193,10 @@ extern void usbnet_defer_kevent (struct usbnet *, int);
187extern void usbnet_skb_return (struct usbnet *, struct sk_buff *); 193extern void usbnet_skb_return (struct usbnet *, struct sk_buff *);
188extern void usbnet_unlink_rx_urbs(struct usbnet *); 194extern void usbnet_unlink_rx_urbs(struct usbnet *);
189 195
196extern void usbnet_pause_rx(struct usbnet *);
197extern void usbnet_resume_rx(struct usbnet *);
198extern void usbnet_purge_paused_rxq(struct usbnet *);
199
190extern 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);
191extern 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);
192extern u32 usbnet_get_link (struct net_device *net); 202extern u32 usbnet_get_link (struct net_device *net);