usbnet: add rx queue pausing
Add rx queue pausing to usbnet. This is needed by rndis_wlan so that it can control rx queue and prevent received packets from being send forward before rndis_wlan receives and handles 'media connect'-indication. Without this establishing WPA connections is hard and fail often. [v2] - removed unneeded use of skb_clone Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
d4de9532fd
commit
7834ddbcc7
@@ -53,6 +53,7 @@ struct usbnet {
|
||||
struct sk_buff_head rxq;
|
||||
struct sk_buff_head txq;
|
||||
struct sk_buff_head done;
|
||||
struct sk_buff_head rxq_pause;
|
||||
struct urb *interrupt;
|
||||
struct tasklet_struct bh;
|
||||
|
||||
@@ -63,6 +64,7 @@ struct usbnet {
|
||||
# define EVENT_RX_MEMORY 2
|
||||
# define EVENT_STS_SPLIT 3
|
||||
# define EVENT_LINK_RESET 4
|
||||
# define EVENT_RX_PAUSED 5
|
||||
};
|
||||
|
||||
static inline struct usb_driver *driver_of(struct usb_interface *intf)
|
||||
@@ -190,6 +192,10 @@ extern void usbnet_defer_kevent (struct usbnet *, int);
|
||||
extern void usbnet_skb_return (struct usbnet *, struct sk_buff *);
|
||||
extern void usbnet_unlink_rx_urbs(struct usbnet *);
|
||||
|
||||
extern void usbnet_pause_rx(struct usbnet *);
|
||||
extern void usbnet_resume_rx(struct usbnet *);
|
||||
extern void usbnet_purge_paused_rxq(struct usbnet *);
|
||||
|
||||
extern int usbnet_get_settings (struct net_device *net, struct ethtool_cmd *cmd);
|
||||
extern int usbnet_set_settings (struct net_device *net, struct ethtool_cmd *cmd);
|
||||
extern u32 usbnet_get_link (struct net_device *net);
|
||||
|
Reference in New Issue
Block a user