Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
usbnet.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/ctype.h>
#include <linux/ethtool.h>
#include <linux/workqueue.h>
#include <linux/mii.h>
#include <linux/usb.h>
#include <linux/usb/usbnet.h>
#include <linux/slab.h>
#include <linux/kernel.h>
#include <linux/pm_runtime.h>

Go to the source code of this file.

Macros

#define DRIVER_VERSION   "22-Aug-2005"
 
#define RX_MAX_QUEUE_MEMORY   (60 * 1518)
 
#define RX_QLEN(dev)
 
#define TX_QLEN(dev)
 
#define TX_TIMEOUT_JIFFIES   (5*HZ)
 
#define THROTTLE_JIFFIES   (HZ/8)
 
#define UNLINK_TIMEOUT_MS   3
 

Functions

 module_param (msg_level, int, 0)
 
 MODULE_PARM_DESC (msg_level,"Override default message level")
 
int usbnet_get_endpoints (struct usbnet *dev, struct usb_interface *intf)
 
 EXPORT_SYMBOL_GPL (usbnet_get_endpoints)
 
int usbnet_get_ethernet_addr (struct usbnet *dev, int iMACAddress)
 
 EXPORT_SYMBOL_GPL (usbnet_get_ethernet_addr)
 
void usbnet_skb_return (struct usbnet *dev, struct sk_buff *skb)
 
 EXPORT_SYMBOL_GPL (usbnet_skb_return)
 
int usbnet_change_mtu (struct net_device *net, int new_mtu)
 
 EXPORT_SYMBOL_GPL (usbnet_change_mtu)
 
void usbnet_defer_kevent (struct usbnet *dev, int work)
 
 EXPORT_SYMBOL_GPL (usbnet_defer_kevent)
 
void usbnet_pause_rx (struct usbnet *dev)
 
 EXPORT_SYMBOL_GPL (usbnet_pause_rx)
 
void usbnet_resume_rx (struct usbnet *dev)
 
 EXPORT_SYMBOL_GPL (usbnet_resume_rx)
 
void usbnet_purge_paused_rxq (struct usbnet *dev)
 
 EXPORT_SYMBOL_GPL (usbnet_purge_paused_rxq)
 
void usbnet_unlink_rx_urbs (struct usbnet *dev)
 
 EXPORT_SYMBOL_GPL (usbnet_unlink_rx_urbs)
 
int usbnet_stop (struct net_device *net)
 
 EXPORT_SYMBOL_GPL (usbnet_stop)
 
int usbnet_open (struct net_device *net)
 
 EXPORT_SYMBOL_GPL (usbnet_open)
 
int usbnet_get_settings (struct net_device *net, struct ethtool_cmd *cmd)
 
 EXPORT_SYMBOL_GPL (usbnet_get_settings)
 
int usbnet_set_settings (struct net_device *net, struct ethtool_cmd *cmd)
 
 EXPORT_SYMBOL_GPL (usbnet_set_settings)
 
u32 usbnet_get_link (struct net_device *net)
 
 EXPORT_SYMBOL_GPL (usbnet_get_link)
 
int usbnet_nway_reset (struct net_device *net)
 
 EXPORT_SYMBOL_GPL (usbnet_nway_reset)
 
void usbnet_get_drvinfo (struct net_device *net, struct ethtool_drvinfo *info)
 
 EXPORT_SYMBOL_GPL (usbnet_get_drvinfo)
 
u32 usbnet_get_msglevel (struct net_device *net)
 
 EXPORT_SYMBOL_GPL (usbnet_get_msglevel)
 
void usbnet_set_msglevel (struct net_device *net, u32 level)
 
 EXPORT_SYMBOL_GPL (usbnet_set_msglevel)
 
void usbnet_tx_timeout (struct net_device *net)
 
 EXPORT_SYMBOL_GPL (usbnet_tx_timeout)
 
netdev_tx_t usbnet_start_xmit (struct sk_buff *skb, struct net_device *net)
 
 EXPORT_SYMBOL_GPL (usbnet_start_xmit)
 
void usbnet_disconnect (struct usb_interface *intf)
 
 EXPORT_SYMBOL_GPL (usbnet_disconnect)
 
int usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
 
 EXPORT_SYMBOL_GPL (usbnet_probe)
 
int usbnet_suspend (struct usb_interface *intf, pm_message_t message)
 
 EXPORT_SYMBOL_GPL (usbnet_suspend)
 
int usbnet_resume (struct usb_interface *intf)
 
 EXPORT_SYMBOL_GPL (usbnet_resume)
 
void usbnet_device_suggests_idle (struct usbnet *dev)
 
 EXPORT_SYMBOL (usbnet_device_suggests_idle)
 
 module_init (usbnet_init)
 
 module_exit (usbnet_exit)
 
 MODULE_AUTHOR ("David Brownell")
 
 MODULE_DESCRIPTION ("USB network driver framework")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define DRIVER_VERSION   "22-Aug-2005"

Definition at line 50 of file usbnet.c.

#define RX_MAX_QUEUE_MEMORY   (60 * 1518)

Definition at line 66 of file usbnet.c.

#define RX_QLEN (   dev)
Value:
(((dev)->udev->speed == USB_SPEED_HIGH) ? \
(RX_MAX_QUEUE_MEMORY/(dev)->rx_urb_size) : 4)

Definition at line 67 of file usbnet.c.

#define THROTTLE_JIFFIES   (HZ/8)

Definition at line 77 of file usbnet.c.

#define TX_QLEN (   dev)
Value:
(((dev)->udev->speed == USB_SPEED_HIGH) ? \
(RX_MAX_QUEUE_MEMORY/(dev)->hard_mtu) : 4)

Definition at line 69 of file usbnet.c.

#define TX_TIMEOUT_JIFFIES   (5*HZ)

Definition at line 73 of file usbnet.c.

#define UNLINK_TIMEOUT_MS   3

Definition at line 80 of file usbnet.c.

Function Documentation

EXPORT_SYMBOL ( usbnet_device_suggests_idle  )
EXPORT_SYMBOL_GPL ( usbnet_get_endpoints  )
EXPORT_SYMBOL_GPL ( usbnet_get_ethernet_addr  )
EXPORT_SYMBOL_GPL ( usbnet_skb_return  )
EXPORT_SYMBOL_GPL ( usbnet_change_mtu  )
EXPORT_SYMBOL_GPL ( usbnet_defer_kevent  )
EXPORT_SYMBOL_GPL ( usbnet_pause_rx  )
EXPORT_SYMBOL_GPL ( usbnet_resume_rx  )
EXPORT_SYMBOL_GPL ( usbnet_purge_paused_rxq  )
EXPORT_SYMBOL_GPL ( usbnet_unlink_rx_urbs  )
EXPORT_SYMBOL_GPL ( usbnet_stop  )
EXPORT_SYMBOL_GPL ( usbnet_open  )
EXPORT_SYMBOL_GPL ( usbnet_get_settings  )
EXPORT_SYMBOL_GPL ( usbnet_set_settings  )
EXPORT_SYMBOL_GPL ( usbnet_get_link  )
EXPORT_SYMBOL_GPL ( usbnet_nway_reset  )
EXPORT_SYMBOL_GPL ( usbnet_get_drvinfo  )
EXPORT_SYMBOL_GPL ( usbnet_get_msglevel  )
EXPORT_SYMBOL_GPL ( usbnet_set_msglevel  )
EXPORT_SYMBOL_GPL ( usbnet_tx_timeout  )
EXPORT_SYMBOL_GPL ( usbnet_start_xmit  )
EXPORT_SYMBOL_GPL ( usbnet_disconnect  )
EXPORT_SYMBOL_GPL ( usbnet_probe  )
EXPORT_SYMBOL_GPL ( usbnet_suspend  )
EXPORT_SYMBOL_GPL ( usbnet_resume  )
MODULE_AUTHOR ( "David Brownell"  )
MODULE_DESCRIPTION ( "USB network driver framework"  )
module_exit ( usbnet_exit  )
module_init ( usbnet_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( msg_level  ,
int  ,
 
)
MODULE_PARM_DESC ( msg_level  ,
"Override default message level  
)
int usbnet_change_mtu ( struct net_device net,
int  new_mtu 
)

Definition at line 293 of file usbnet.c.

void usbnet_defer_kevent ( struct usbnet dev,
int  work 
)

Definition at line 359 of file usbnet.c.

void usbnet_device_suggests_idle ( struct usbnet dev)

Definition at line 1609 of file usbnet.c.

void usbnet_disconnect ( struct usb_interface intf)

Definition at line 1293 of file usbnet.c.

void usbnet_get_drvinfo ( struct net_device net,
struct ethtool_drvinfo info 
)

Definition at line 876 of file usbnet.c.

int usbnet_get_endpoints ( struct usbnet dev,
struct usb_interface intf 
)

Definition at line 97 of file usbnet.c.

int usbnet_get_ethernet_addr ( struct usbnet dev,
int  iMACAddress 
)

Definition at line 163 of file usbnet.c.

u32 usbnet_get_link ( struct net_device net)

Definition at line 848 of file usbnet.c.

u32 usbnet_get_msglevel ( struct net_device net)

Definition at line 888 of file usbnet.c.

int usbnet_get_settings ( struct net_device net,
struct ethtool_cmd cmd 
)

Definition at line 818 of file usbnet.c.

int usbnet_nway_reset ( struct net_device net)

Definition at line 865 of file usbnet.c.

int usbnet_open ( struct net_device net)

Definition at line 737 of file usbnet.c.

void usbnet_pause_rx ( struct usbnet dev)

Definition at line 558 of file usbnet.c.

int usbnet_probe ( struct usb_interface udev,
const struct usb_device_id prod 
)

Definition at line 1351 of file usbnet.c.

void usbnet_purge_paused_rxq ( struct usbnet dev)

Definition at line 585 of file usbnet.c.

int usbnet_resume ( struct usb_interface intf)

Definition at line 1552 of file usbnet.c.

void usbnet_resume_rx ( struct usbnet dev)

Definition at line 566 of file usbnet.c.

void usbnet_set_msglevel ( struct net_device net,
u32  level 
)

Definition at line 896 of file usbnet.c.

int usbnet_set_settings ( struct net_device net,
struct ethtool_cmd cmd 
)

Definition at line 829 of file usbnet.c.

void usbnet_skb_return ( struct usbnet dev,
struct sk_buff skb 
)

Definition at line 259 of file usbnet.c.

netdev_tx_t usbnet_start_xmit ( struct sk_buff skb,
struct net_device net 
)

Definition at line 1086 of file usbnet.c.

int usbnet_stop ( struct net_device net)

Definition at line 682 of file usbnet.c.

int usbnet_suspend ( struct usb_interface intf,
pm_message_t  message 
)

Definition at line 1519 of file usbnet.c.

void usbnet_tx_timeout ( struct net_device net)

Definition at line 1073 of file usbnet.c.

void usbnet_unlink_rx_urbs ( struct usbnet dev)

Definition at line 643 of file usbnet.c.