diff options
Diffstat (limited to 'include/linux/usb/usbnet.h')
-rw-r--r-- | include/linux/usb/usbnet.h | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index f81473052059..df1e83dd9a54 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
@@ -55,6 +55,7 @@ struct usbnet { | |||
55 | struct sk_buff_head done; | 55 | struct sk_buff_head done; |
56 | struct sk_buff_head rxq_pause; | 56 | struct sk_buff_head rxq_pause; |
57 | struct urb *interrupt; | 57 | struct urb *interrupt; |
58 | struct usb_anchor deferred; | ||
58 | struct tasklet_struct bh; | 59 | struct tasklet_struct bh; |
59 | 60 | ||
60 | struct work_struct kevent; | 61 | struct work_struct kevent; |
@@ -65,6 +66,8 @@ struct usbnet { | |||
65 | # define EVENT_STS_SPLIT 3 | 66 | # define EVENT_STS_SPLIT 3 |
66 | # define EVENT_LINK_RESET 4 | 67 | # define EVENT_LINK_RESET 4 |
67 | # define EVENT_RX_PAUSED 5 | 68 | # define EVENT_RX_PAUSED 5 |
69 | # define EVENT_DEV_WAKING 6 | ||
70 | # define EVENT_DEV_ASLEEP 7 | ||
68 | }; | 71 | }; |
69 | 72 | ||
70 | static inline struct usb_driver *driver_of(struct usb_interface *intf) | 73 | static inline struct usb_driver *driver_of(struct usb_interface *intf) |
@@ -90,7 +93,9 @@ struct driver_info { | |||
90 | #define FLAG_WLAN 0x0080 /* use "wlan%d" names */ | 93 | #define FLAG_WLAN 0x0080 /* use "wlan%d" names */ |
91 | #define FLAG_AVOID_UNLINK_URBS 0x0100 /* don't unlink urbs at usbnet_stop() */ | 94 | #define FLAG_AVOID_UNLINK_URBS 0x0100 /* don't unlink urbs at usbnet_stop() */ |
92 | #define FLAG_SEND_ZLP 0x0200 /* hw requires ZLPs are sent */ | 95 | #define FLAG_SEND_ZLP 0x0200 /* hw requires ZLPs are sent */ |
96 | #define FLAG_WWAN 0x0400 /* use "wwan%d" names */ | ||
93 | 97 | ||
98 | #define FLAG_LINK_INTR 0x0800 /* updates link (carrier) status */ | ||
94 | 99 | ||
95 | /* init device ... can sleep, or cause probe() failure */ | 100 | /* init device ... can sleep, or cause probe() failure */ |
96 | int (*bind)(struct usbnet *, struct usb_interface *); | 101 | int (*bind)(struct usbnet *, struct usb_interface *); |
@@ -107,6 +112,9 @@ struct driver_info { | |||
107 | /* see if peer is connected ... can sleep */ | 112 | /* see if peer is connected ... can sleep */ |
108 | int (*check_connect)(struct usbnet *); | 113 | int (*check_connect)(struct usbnet *); |
109 | 114 | ||
115 | /* (dis)activate runtime power management */ | ||
116 | int (*manage_power)(struct usbnet *, int); | ||
117 | |||
110 | /* for status polling */ | 118 | /* for status polling */ |
111 | void (*status)(struct usbnet *, struct urb *); | 119 | void (*status)(struct usbnet *, struct urb *); |
112 | 120 | ||
@@ -206,25 +214,4 @@ extern void usbnet_set_msglevel (struct net_device *, u32); | |||
206 | extern void usbnet_get_drvinfo (struct net_device *, struct ethtool_drvinfo *); | 214 | extern void usbnet_get_drvinfo (struct net_device *, struct ethtool_drvinfo *); |
207 | extern int usbnet_nway_reset(struct net_device *net); | 215 | extern int usbnet_nway_reset(struct net_device *net); |
208 | 216 | ||
209 | /* messaging support includes the interface name, so it must not be | ||
210 | * used before it has one ... notably, in minidriver bind() calls. | ||
211 | */ | ||
212 | #ifdef DEBUG | ||
213 | #define devdbg(usbnet, fmt, arg...) \ | ||
214 | printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , ## arg) | ||
215 | #else | ||
216 | #define devdbg(usbnet, fmt, arg...) \ | ||
217 | ({ if (0) printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , \ | ||
218 | ## arg); 0; }) | ||
219 | #endif | ||
220 | |||
221 | #define deverr(usbnet, fmt, arg...) \ | ||
222 | printk(KERN_ERR "%s: " fmt "\n" , (usbnet)->net->name , ## arg) | ||
223 | #define devwarn(usbnet, fmt, arg...) \ | ||
224 | printk(KERN_WARNING "%s: " fmt "\n" , (usbnet)->net->name , ## arg) | ||
225 | |||
226 | #define devinfo(usbnet, fmt, arg...) \ | ||
227 | printk(KERN_INFO "%s: " fmt "\n" , (usbnet)->net->name , ## arg); \ | ||
228 | |||
229 | |||
230 | #endif /* __LINUX_USB_USBNET_H */ | 217 | #endif /* __LINUX_USB_USBNET_H */ |