diff options
Diffstat (limited to 'include/linux/usb/usbnet.h')
| -rw-r--r-- | include/linux/usb/usbnet.h | 61 |
1 files changed, 21 insertions, 40 deletions
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index 8ce61359bf73..7ae27a473818 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
| @@ -43,7 +43,7 @@ struct usbnet { | |||
| 43 | /* protocol/interface state */ | 43 | /* protocol/interface state */ |
| 44 | struct net_device *net; | 44 | struct net_device *net; |
| 45 | int msg_enable; | 45 | int msg_enable; |
| 46 | unsigned long data [5]; | 46 | unsigned long data[5]; |
| 47 | u32 xid; | 47 | u32 xid; |
| 48 | u32 hard_mtu; /* count any extra framing */ | 48 | u32 hard_mtu; /* count any extra framing */ |
| 49 | size_t rx_urb_size; /* size for rx urbs */ | 49 | size_t rx_urb_size; /* size for rx urbs */ |
| @@ -148,8 +148,8 @@ struct driver_info { | |||
| 148 | * much everything except custom framing and chip-specific stuff. | 148 | * much everything except custom framing and chip-specific stuff. |
| 149 | */ | 149 | */ |
| 150 | extern int usbnet_probe(struct usb_interface *, const struct usb_device_id *); | 150 | extern int usbnet_probe(struct usb_interface *, const struct usb_device_id *); |
| 151 | extern int usbnet_suspend (struct usb_interface *, pm_message_t ); | 151 | extern int usbnet_suspend(struct usb_interface *, pm_message_t); |
| 152 | extern int usbnet_resume (struct usb_interface *); | 152 | extern int usbnet_resume(struct usb_interface *); |
| 153 | extern void usbnet_disconnect(struct usb_interface *); | 153 | extern void usbnet_disconnect(struct usb_interface *); |
| 154 | 154 | ||
| 155 | 155 | ||
| @@ -165,8 +165,8 @@ struct cdc_state { | |||
| 165 | struct usb_interface *data; | 165 | struct usb_interface *data; |
| 166 | }; | 166 | }; |
| 167 | 167 | ||
| 168 | extern int usbnet_generic_cdc_bind (struct usbnet *, struct usb_interface *); | 168 | extern int usbnet_generic_cdc_bind(struct usbnet *, struct usb_interface *); |
| 169 | extern void usbnet_cdc_unbind (struct usbnet *, struct usb_interface *); | 169 | extern void usbnet_cdc_unbind(struct usbnet *, struct usb_interface *); |
| 170 | 170 | ||
| 171 | /* CDC and RNDIS support the same host-chosen packet filters for IN transfers */ | 171 | /* CDC and RNDIS support the same host-chosen packet filters for IN transfers */ |
| 172 | #define DEFAULT_FILTER (USB_CDC_PACKET_TYPE_BROADCAST \ | 172 | #define DEFAULT_FILTER (USB_CDC_PACKET_TYPE_BROADCAST \ |
| @@ -189,50 +189,31 @@ struct skb_data { /* skb->cb is one of these */ | |||
| 189 | size_t length; | 189 | size_t length; |
| 190 | }; | 190 | }; |
| 191 | 191 | ||
| 192 | extern int usbnet_open (struct net_device *net); | 192 | extern int usbnet_open(struct net_device *net); |
| 193 | extern int usbnet_stop (struct net_device *net); | 193 | extern int usbnet_stop(struct net_device *net); |
| 194 | extern netdev_tx_t usbnet_start_xmit (struct sk_buff *skb, | 194 | extern netdev_tx_t usbnet_start_xmit(struct sk_buff *skb, |
| 195 | struct net_device *net); | 195 | struct net_device *net); |
| 196 | extern void usbnet_tx_timeout (struct net_device *net); | 196 | extern void usbnet_tx_timeout(struct net_device *net); |
| 197 | extern int usbnet_change_mtu (struct net_device *net, int new_mtu); | 197 | extern int usbnet_change_mtu(struct net_device *net, int new_mtu); |
| 198 | 198 | ||
| 199 | extern int usbnet_get_endpoints(struct usbnet *, struct usb_interface *); | 199 | extern int usbnet_get_endpoints(struct usbnet *, struct usb_interface *); |
| 200 | extern int usbnet_get_ethernet_addr(struct usbnet *, int); | 200 | extern int usbnet_get_ethernet_addr(struct usbnet *, int); |
| 201 | extern void usbnet_defer_kevent (struct usbnet *, int); | 201 | extern void usbnet_defer_kevent(struct usbnet *, int); |
| 202 | extern void usbnet_skb_return (struct usbnet *, struct sk_buff *); | 202 | extern void usbnet_skb_return(struct usbnet *, struct sk_buff *); |
| 203 | extern void usbnet_unlink_rx_urbs(struct usbnet *); | 203 | extern void usbnet_unlink_rx_urbs(struct usbnet *); |
| 204 | 204 | ||
| 205 | extern void usbnet_pause_rx(struct usbnet *); | 205 | extern void usbnet_pause_rx(struct usbnet *); |
| 206 | extern void usbnet_resume_rx(struct usbnet *); | 206 | extern void usbnet_resume_rx(struct usbnet *); |
| 207 | extern void usbnet_purge_paused_rxq(struct usbnet *); | 207 | extern void usbnet_purge_paused_rxq(struct usbnet *); |
| 208 | 208 | ||
| 209 | extern int usbnet_get_settings (struct net_device *net, struct ethtool_cmd *cmd); | 209 | extern int usbnet_get_settings(struct net_device *net, |
| 210 | extern int usbnet_set_settings (struct net_device *net, struct ethtool_cmd *cmd); | 210 | struct ethtool_cmd *cmd); |
| 211 | extern u32 usbnet_get_link (struct net_device *net); | 211 | extern int usbnet_set_settings(struct net_device *net, |
| 212 | extern u32 usbnet_get_msglevel (struct net_device *); | 212 | struct ethtool_cmd *cmd); |
| 213 | extern void usbnet_set_msglevel (struct net_device *, u32); | 213 | extern u32 usbnet_get_link(struct net_device *net); |
| 214 | extern void usbnet_get_drvinfo (struct net_device *, struct ethtool_drvinfo *); | 214 | extern u32 usbnet_get_msglevel(struct net_device *); |
| 215 | extern void usbnet_set_msglevel(struct net_device *, u32); | ||
| 216 | extern void usbnet_get_drvinfo(struct net_device *, struct ethtool_drvinfo *); | ||
| 215 | extern int usbnet_nway_reset(struct net_device *net); | 217 | extern int usbnet_nway_reset(struct net_device *net); |
| 216 | 218 | ||
| 217 | /* messaging support includes the interface name, so it must not be | ||
| 218 | * used before it has one ... notably, in minidriver bind() calls. | ||
| 219 | */ | ||
| 220 | #ifdef DEBUG | ||
| 221 | #define devdbg(usbnet, fmt, arg...) \ | ||
| 222 | printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , ## arg) | ||
| 223 | #else | ||
| 224 | #define devdbg(usbnet, fmt, arg...) \ | ||
| 225 | ({ if (0) printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , \ | ||
| 226 | ## arg); 0; }) | ||
| 227 | #endif | ||
| 228 | |||
| 229 | #define deverr(usbnet, fmt, arg...) \ | ||
| 230 | printk(KERN_ERR "%s: " fmt "\n" , (usbnet)->net->name , ## arg) | ||
| 231 | #define devwarn(usbnet, fmt, arg...) \ | ||
| 232 | printk(KERN_WARNING "%s: " fmt "\n" , (usbnet)->net->name , ## arg) | ||
| 233 | |||
| 234 | #define devinfo(usbnet, fmt, arg...) \ | ||
| 235 | printk(KERN_INFO "%s: " fmt "\n" , (usbnet)->net->name , ## arg); \ | ||
| 236 | |||
| 237 | |||
| 238 | #endif /* __LINUX_USB_USBNET_H */ | 219 | #endif /* __LINUX_USB_USBNET_H */ |
