aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/rndis_host.h13
-rw-r--r--include/linux/usb/usbnet.h18
2 files changed, 21 insertions, 10 deletions
diff --git a/include/linux/usb/rndis_host.h b/include/linux/usb/rndis_host.h
index 37836b937d97..1ef1ebc2b04f 100644
--- a/include/linux/usb/rndis_host.h
+++ b/include/linux/usb/rndis_host.h
@@ -70,12 +70,13 @@ struct rndis_msg_hdr {
70#define RNDIS_MSG_KEEPALIVE_C (RNDIS_MSG_KEEPALIVE|RNDIS_MSG_COMPLETION) 70#define RNDIS_MSG_KEEPALIVE_C (RNDIS_MSG_KEEPALIVE|RNDIS_MSG_COMPLETION)
71 71
72/* codes for "status" field of completion messages */ 72/* codes for "status" field of completion messages */
73#define RNDIS_STATUS_SUCCESS cpu_to_le32(0x00000000) 73#define RNDIS_STATUS_SUCCESS cpu_to_le32(0x00000000)
74#define RNDIS_STATUS_FAILURE cpu_to_le32(0xc0000001) 74#define RNDIS_STATUS_FAILURE cpu_to_le32(0xc0000001)
75#define RNDIS_STATUS_INVALID_DATA cpu_to_le32(0xc0010015) 75#define RNDIS_STATUS_INVALID_DATA cpu_to_le32(0xc0010015)
76#define RNDIS_STATUS_NOT_SUPPORTED cpu_to_le32(0xc00000bb) 76#define RNDIS_STATUS_NOT_SUPPORTED cpu_to_le32(0xc00000bb)
77#define RNDIS_STATUS_MEDIA_CONNECT cpu_to_le32(0x4001000b) 77#define RNDIS_STATUS_MEDIA_CONNECT cpu_to_le32(0x4001000b)
78#define RNDIS_STATUS_MEDIA_DISCONNECT cpu_to_le32(0x4001000c) 78#define RNDIS_STATUS_MEDIA_DISCONNECT cpu_to_le32(0x4001000c)
79#define RNDIS_STATUS_MEDIA_SPECIFIC_INDICATION cpu_to_le32(0x40010012)
79 80
80/* codes for OID_GEN_PHYSICAL_MEDIUM */ 81/* codes for OID_GEN_PHYSICAL_MEDIUM */
81#define RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED cpu_to_le32(0x00000000) 82#define RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED cpu_to_le32(0x00000000)
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);