Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
usbatm.c File Reference
#include "usbatm.h"
#include <asm/uaccess.h>
#include <linux/crc32.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/netdevice.h>
#include <linux/proc_fs.h>
#include <linux/sched.h>
#include <linux/signal.h>
#include <linux/slab.h>
#include <linux/stat.h>
#include <linux/timer.h>
#include <linux/wait.h>
#include <linux/kthread.h>
#include <linux/ratelimit.h>

Go to the source code of this file.

Data Structures

struct  usbatm_vcc_data
 
struct  usbatm_control
 

Macros

#define PACKETDEBUG(arg...)
 
#define vdbg(arg...)
 
#define DRIVER_AUTHOR   "Johan Verrept, Duncan Sands <[email protected]>"
 
#define DRIVER_VERSION   "1.10"
 
#define DRIVER_DESC   "Generic USB ATM/DSL I/O, version " DRIVER_VERSION
 
#define UDSL_MAX_RCV_URBS   16
 
#define UDSL_MAX_SND_URBS   16
 
#define UDSL_MAX_BUF_SIZE   65536
 
#define UDSL_DEFAULT_RCV_URBS   4
 
#define UDSL_DEFAULT_SND_URBS   4
 
#define UDSL_DEFAULT_RCV_BUF_SIZE   3392 /* 64 * ATM_CELL_SIZE */
 
#define UDSL_DEFAULT_SND_BUF_SIZE   3392 /* 64 * ATM_CELL_SIZE */
 
#define ATM_CELL_HEADER   (ATM_CELL_SIZE - ATM_CELL_PAYLOAD)
 
#define THROTTLE_MSECS   100 /* delay to recover processing after urb submission fails */
 
#define UDSL_SKB(x)   ((struct usbatm_control *)(x)->cb)
 

Functions

 module_param (num_rcv_urbs, uint, S_IRUGO)
 
 MODULE_PARM_DESC (num_rcv_urbs,"Number of urbs used for reception (range: 0-"__MODULE_STRING(UDSL_MAX_RCV_URBS)", default: "__MODULE_STRING(UDSL_DEFAULT_RCV_URBS)")")
 
 module_param (num_snd_urbs, uint, S_IRUGO)
 
 MODULE_PARM_DESC (num_snd_urbs,"Number of urbs used for transmission (range: 0-"__MODULE_STRING(UDSL_MAX_SND_URBS)", default: "__MODULE_STRING(UDSL_DEFAULT_SND_URBS)")")
 
 module_param (rcv_buf_bytes, uint, S_IRUGO)
 
 MODULE_PARM_DESC (rcv_buf_bytes,"Size of the buffers used for reception, in bytes (range: 1-"__MODULE_STRING(UDSL_MAX_BUF_SIZE)", default: "__MODULE_STRING(UDSL_DEFAULT_RCV_BUF_SIZE)")")
 
 module_param (snd_buf_bytes, uint, S_IRUGO)
 
 MODULE_PARM_DESC (snd_buf_bytes,"Size of the buffers used for transmission, in bytes (range: 1-"__MODULE_STRING(UDSL_MAX_BUF_SIZE)", default: "__MODULE_STRING(UDSL_DEFAULT_SND_BUF_SIZE)")")
 
int usbatm_usb_probe (struct usb_interface *intf, const struct usb_device_id *id, struct usbatm_driver *driver)
 
 EXPORT_SYMBOL_GPL (usbatm_usb_probe)
 
void usbatm_usb_disconnect (struct usb_interface *intf)
 
 EXPORT_SYMBOL_GPL (usbatm_usb_disconnect)
 
 module_init (usbatm_usb_init)
 
 module_exit (usbatm_usb_exit)
 
 MODULE_AUTHOR (DRIVER_AUTHOR)
 
 MODULE_DESCRIPTION (DRIVER_DESC)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_VERSION (DRIVER_VERSION)
 

Macro Definition Documentation

#define ATM_CELL_HEADER   (ATM_CELL_SIZE - ATM_CELL_PAYLOAD)

Definition at line 109 of file usbatm.c.

#define DRIVER_AUTHOR   "Johan Verrept, Duncan Sands <[email protected]>"

Definition at line 95 of file usbatm.c.

#define DRIVER_DESC   "Generic USB ATM/DSL I/O, version " DRIVER_VERSION

Definition at line 97 of file usbatm.c.

#define DRIVER_VERSION   "1.10"

Definition at line 96 of file usbatm.c.

#define PACKETDEBUG (   arg...)

Definition at line 91 of file usbatm.c.

#define THROTTLE_MSECS   100 /* delay to recover processing after urb submission fails */

Definition at line 111 of file usbatm.c.

#define UDSL_DEFAULT_RCV_BUF_SIZE   3392 /* 64 * ATM_CELL_SIZE */

Definition at line 106 of file usbatm.c.

#define UDSL_DEFAULT_RCV_URBS   4

Definition at line 104 of file usbatm.c.

#define UDSL_DEFAULT_SND_BUF_SIZE   3392 /* 64 * ATM_CELL_SIZE */

Definition at line 107 of file usbatm.c.

#define UDSL_DEFAULT_SND_URBS   4

Definition at line 105 of file usbatm.c.

#define UDSL_MAX_BUF_SIZE   65536

Definition at line 103 of file usbatm.c.

#define UDSL_MAX_RCV_URBS   16

Definition at line 101 of file usbatm.c.

#define UDSL_MAX_SND_URBS   16

Definition at line 102 of file usbatm.c.

#define UDSL_SKB (   x)    ((struct usbatm_control *)(x)->cb)

Definition at line 165 of file usbatm.c.

#define vdbg (   arg...)

Definition at line 92 of file usbatm.c.

Function Documentation

EXPORT_SYMBOL_GPL ( usbatm_usb_probe  )
EXPORT_SYMBOL_GPL ( usbatm_usb_disconnect  )
MODULE_AUTHOR ( DRIVER_AUTHOR  )
MODULE_DESCRIPTION ( DRIVER_DESC  )
module_exit ( usbatm_usb_exit  )
module_init ( usbatm_usb_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( num_rcv_urbs  ,
uint  ,
S_IRUGO   
)
module_param ( num_snd_urbs  ,
uint  ,
S_IRUGO   
)
module_param ( rcv_buf_bytes  ,
uint  ,
S_IRUGO   
)
module_param ( snd_buf_bytes  ,
uint  ,
S_IRUGO   
)
MODULE_PARM_DESC ( num_rcv_urbs  ,
"Number of urbs used for reception (range: 0-"__MODULE_STRING(UDSL_MAX_RCV_URBS)", default: "__MODULE_STRING(UDSL_DEFAULT_RCV_URBS)")"   
)
MODULE_PARM_DESC ( num_snd_urbs  ,
"Number of urbs used for transmission (range: 0-"__MODULE_STRING(UDSL_MAX_SND_URBS)", default: "__MODULE_STRING(UDSL_DEFAULT_SND_URBS)")"   
)
MODULE_PARM_DESC ( rcv_buf_bytes  ,
"Size of the buffers used for  reception,
in bytes(range:1-"__MODULE_STRING(UDSL_MAX_BUF_SIZE)", default:"__MODULE_STRING(UDSL_DEFAULT_RCV_BUF_SIZE)")"   
)
MODULE_PARM_DESC ( snd_buf_bytes  ,
"Size of the buffers used for  transmission,
in bytes(range:1-"__MODULE_STRING(UDSL_MAX_BUF_SIZE)", default:"__MODULE_STRING(UDSL_DEFAULT_SND_BUF_SIZE)")"   
)
MODULE_VERSION ( DRIVER_VERSION  )
void usbatm_usb_disconnect ( struct usb_interface intf)

Definition at line 1261 of file usbatm.c.

int usbatm_usb_probe ( struct usb_interface intf,
const struct usb_device_id id,
struct usbatm_driver driver 
)

Definition at line 1052 of file usbatm.c.