diff options
Diffstat (limited to 'include/linux/usb/usbnet.h')
-rw-r--r-- | include/linux/usb/usbnet.h | 18 |
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 | ||
68 | static inline struct usb_driver *driver_of(struct usb_interface *intf) | 70 | static 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 | ||
178 | extern int usbnet_open (struct net_device *net); | 183 | extern int usbnet_open (struct net_device *net); |
179 | extern int usbnet_stop (struct net_device *net); | 184 | extern int usbnet_stop (struct net_device *net); |
180 | extern int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net); | 185 | extern netdev_tx_t usbnet_start_xmit (struct sk_buff *skb, |
186 | struct net_device *net); | ||
181 | extern void usbnet_tx_timeout (struct net_device *net); | 187 | extern void usbnet_tx_timeout (struct net_device *net); |
182 | extern int usbnet_change_mtu (struct net_device *net, int new_mtu); | 188 | extern 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); | |||
187 | extern void usbnet_skb_return (struct usbnet *, struct sk_buff *); | 193 | extern void usbnet_skb_return (struct usbnet *, struct sk_buff *); |
188 | extern void usbnet_unlink_rx_urbs(struct usbnet *); | 194 | extern void usbnet_unlink_rx_urbs(struct usbnet *); |
189 | 195 | ||
196 | extern void usbnet_pause_rx(struct usbnet *); | ||
197 | extern void usbnet_resume_rx(struct usbnet *); | ||
198 | extern void usbnet_purge_paused_rxq(struct usbnet *); | ||
199 | |||
190 | extern int usbnet_get_settings (struct net_device *net, struct ethtool_cmd *cmd); | 200 | extern int usbnet_get_settings (struct net_device *net, struct ethtool_cmd *cmd); |
191 | extern int usbnet_set_settings (struct net_device *net, struct ethtool_cmd *cmd); | 201 | extern int usbnet_set_settings (struct net_device *net, struct ethtool_cmd *cmd); |
192 | extern u32 usbnet_get_link (struct net_device *net); | 202 | extern u32 usbnet_get_link (struct net_device *net); |