Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
at76c50x-usb.c File Reference
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/spinlock.h>
#include <linux/list.h>
#include <linux/usb.h>
#include <linux/netdevice.h>
#include <linux/if_arp.h>
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
#include <linux/wireless.h>
#include <net/iw_handler.h>
#include <net/ieee80211_radiotap.h>
#include <linux/firmware.h>
#include <linux/leds.h>
#include <net/mac80211.h>
#include "at76c50x-usb.h"

Go to the source code of this file.

Data Structures

struct  dfu_status
 

Macros

#define DRIVER_NAME   "at76c50x-usb"
 
#define DRIVER_VERSION   "0.17"
 
#define DRIVER_DESC   "Atmel at76x USB Wireless LAN Driver"
 
#define DBG_PROGRESS   0x00000001 /* authentication/accociation */
 
#define DBG_BSS_TABLE   0x00000002 /* show BSS table after scans */
 
#define DBG_IOCTL   0x00000004 /* ioctl calls / settings */
 
#define DBG_MAC_STATE   0x00000008 /* MAC state transitions */
 
#define DBG_TX_DATA   0x00000010 /* tx header */
 
#define DBG_TX_DATA_CONTENT   0x00000020 /* tx content */
 
#define DBG_TX_MGMT   0x00000040 /* tx management */
 
#define DBG_RX_DATA   0x00000080 /* rx data header */
 
#define DBG_RX_DATA_CONTENT   0x00000100 /* rx data content */
 
#define DBG_RX_MGMT   0x00000200 /* rx mgmt frame headers */
 
#define DBG_RX_BEACON   0x00000400 /* rx beacon */
 
#define DBG_RX_CTRL   0x00000800 /* rx control */
 
#define DBG_RX_MGMT_CONTENT   0x00001000 /* rx mgmt content */
 
#define DBG_RX_FRAGS   0x00002000 /* rx data fragment handling */
 
#define DBG_DEVSTART   0x00004000 /* fw download, device start */
 
#define DBG_URB   0x00008000 /* rx urb status, ... */
 
#define DBG_RX_ATMEL_HDR   0x00010000 /* Atmel-specific Rx headers */
 
#define DBG_PROC_ENTRY   0x00020000 /* procedure entries/exits */
 
#define DBG_PM   0x00040000 /* power management settings */
 
#define DBG_BSS_MATCH   0x00080000 /* BSS match failures */
 
#define DBG_PARAMS   0x00100000 /* show configured parameters */
 
#define DBG_WAIT_COMPLETE   0x00200000 /* command completion */
 
#define DBG_RX_FRAGS_SKB   0x00400000 /* skb header of Rx fragments */
 
#define DBG_BSS_TABLE_RM   0x00800000 /* purging bss table entries */
 
#define DBG_MONITOR_MODE   0x01000000 /* monitor mode */
 
#define DBG_MIB   0x02000000 /* dump all MIBs on startup */
 
#define DBG_MGMT_TIMER   0x04000000 /* dump mgmt_timer ops */
 
#define DBG_WE_EVENTS   0x08000000 /* dump wireless events */
 
#define DBG_FW   0x10000000 /* firmware download */
 
#define DBG_DFU   0x20000000 /* device firmware upgrade */
 
#define DBG_CMD   0x40000000
 
#define DBG_MAC80211   0x80000000
 
#define DBG_DEFAULTS   0
 
#define at76_dbg(bits, format, arg...)
 
#define at76_dbg_dump(bits, buf, len, format, arg...)
 
#define USB_DEVICE_DATA(__ops)   .driver_info = (kernel_ulong_t)(__ops)
 
#define STATE_IDLE   0x00
 
#define STATE_DETACH   0x01
 
#define STATE_DFU_IDLE   0x02
 
#define STATE_DFU_DOWNLOAD_SYNC   0x03
 
#define STATE_DFU_DOWNLOAD_BUSY   0x04
 
#define STATE_DFU_DOWNLOAD_IDLE   0x05
 
#define STATE_DFU_MANIFEST_SYNC   0x06
 
#define STATE_DFU_MANIFEST   0x07
 
#define STATE_DFU_MANIFEST_WAIT_RESET   0x08
 
#define STATE_DFU_UPLOAD_IDLE   0x09
 
#define STATE_DFU_ERROR   0x0a
 
#define DFU_DETACH   0
 
#define DFU_DNLOAD   1
 
#define DFU_UPLOAD   2
 
#define DFU_GETSTATUS   3
 
#define DFU_CLRSTATUS   4
 
#define DFU_GETSTATE   5
 
#define DFU_ABORT   6
 
#define FW_BLOCK_SIZE   1024
 
#define MAKE_CMD_CASE(c)   case (c): return #c
 
#define MAKE_CMD_STATUS_CASE(c)   case (c): return #c
 

Functions

 MODULE_FIRMWARE ("atmel_at76c503-i3861.bin")
 
 MODULE_FIRMWARE ("atmel_at76c503-i3863.bin")
 
 MODULE_FIRMWARE ("atmel_at76c503-rfmd.bin")
 
 MODULE_FIRMWARE ("atmel_at76c503-rfmd-acc.bin")
 
 MODULE_FIRMWARE ("atmel_at76c505-rfmd.bin")
 
 MODULE_FIRMWARE ("atmel_at76c505-rfmd2958.bin")
 
 MODULE_FIRMWARE ("atmel_at76c505a-rfmd2958.bin")
 
 MODULE_FIRMWARE ("atmel_at76c505amx-rfmd.bin")
 
 MODULE_DEVICE_TABLE (usb, dev_table)
 
 DEFINE_LED_TRIGGER (ledtrig_tx)
 
 module_param_named (debug, at76_debug, uint, 0600)
 
 MODULE_PARM_DESC (debug,"Debugging level")
 
 module_init (at76_mod_init)
 
 module_exit (at76_mod_exit)
 
 MODULE_AUTHOR ("Oliver Kurth <[email protected]>")
 
 MODULE_AUTHOR ("Joerg Albert <[email protected]>")
 
 MODULE_AUTHOR ("Alex <[email protected]>")
 
 MODULE_AUTHOR ("Nick Jones")
 
 MODULE_AUTHOR ("Balint Seeber <[email protected]>")
 
 MODULE_AUTHOR ("Pavel Roskin <[email protected]>")
 
 MODULE_AUTHOR ("Guido Guenther <[email protected]>")
 
 MODULE_AUTHOR ("Kalle Valo <[email protected]>")
 
 MODULE_AUTHOR ("Sebastian Smolorz <[email protected]>")
 
 MODULE_DESCRIPTION (DRIVER_DESC)
 
 MODULE_LICENSE ("GPL")
 

Variables

struct dfu_status __packed
 

Macro Definition Documentation

#define at76_dbg (   bits,
  format,
  arg... 
)
Value:
do { \
if (at76_debug & (bits)) \
printk(KERN_DEBUG DRIVER_NAME ": " format "\n", ##arg); \
} while (0)

Definition at line 92 of file at76c50x-usb.c.

#define at76_dbg_dump (   bits,
  buf,
  len,
  format,
  arg... 
)
Value:
do { \
if (at76_debug & (bits)) { \
printk(KERN_DEBUG DRIVER_NAME ": " format "\n", ##arg); \
print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, buf, len); \
} \
} while (0)

Definition at line 98 of file at76c50x-usb.c.

#define DBG_BSS_MATCH   0x00080000 /* BSS match failures */

Definition at line 75 of file at76c50x-usb.c.

#define DBG_BSS_TABLE   0x00000002 /* show BSS table after scans */

Definition at line 57 of file at76c50x-usb.c.

#define DBG_BSS_TABLE_RM   0x00800000 /* purging bss table entries */

Definition at line 79 of file at76c50x-usb.c.

#define DBG_CMD   0x40000000

Definition at line 86 of file at76c50x-usb.c.

#define DBG_DEFAULTS   0

Definition at line 89 of file at76c50x-usb.c.

#define DBG_DEVSTART   0x00004000 /* fw download, device start */

Definition at line 70 of file at76c50x-usb.c.

#define DBG_DFU   0x20000000 /* device firmware upgrade */

Definition at line 85 of file at76c50x-usb.c.

#define DBG_FW   0x10000000 /* firmware download */

Definition at line 84 of file at76c50x-usb.c.

#define DBG_IOCTL   0x00000004 /* ioctl calls / settings */

Definition at line 58 of file at76c50x-usb.c.

#define DBG_MAC80211   0x80000000

Definition at line 87 of file at76c50x-usb.c.

#define DBG_MAC_STATE   0x00000008 /* MAC state transitions */

Definition at line 59 of file at76c50x-usb.c.

#define DBG_MGMT_TIMER   0x04000000 /* dump mgmt_timer ops */

Definition at line 82 of file at76c50x-usb.c.

#define DBG_MIB   0x02000000 /* dump all MIBs on startup */

Definition at line 81 of file at76c50x-usb.c.

#define DBG_MONITOR_MODE   0x01000000 /* monitor mode */

Definition at line 80 of file at76c50x-usb.c.

#define DBG_PARAMS   0x00100000 /* show configured parameters */

Definition at line 76 of file at76c50x-usb.c.

#define DBG_PM   0x00040000 /* power management settings */

Definition at line 74 of file at76c50x-usb.c.

#define DBG_PROC_ENTRY   0x00020000 /* procedure entries/exits */

Definition at line 73 of file at76c50x-usb.c.

#define DBG_PROGRESS   0x00000001 /* authentication/accociation */

Definition at line 56 of file at76c50x-usb.c.

#define DBG_RX_ATMEL_HDR   0x00010000 /* Atmel-specific Rx headers */

Definition at line 72 of file at76c50x-usb.c.

#define DBG_RX_BEACON   0x00000400 /* rx beacon */

Definition at line 66 of file at76c50x-usb.c.

#define DBG_RX_CTRL   0x00000800 /* rx control */

Definition at line 67 of file at76c50x-usb.c.

#define DBG_RX_DATA   0x00000080 /* rx data header */

Definition at line 63 of file at76c50x-usb.c.

#define DBG_RX_DATA_CONTENT   0x00000100 /* rx data content */

Definition at line 64 of file at76c50x-usb.c.

#define DBG_RX_FRAGS   0x00002000 /* rx data fragment handling */

Definition at line 69 of file at76c50x-usb.c.

#define DBG_RX_FRAGS_SKB   0x00400000 /* skb header of Rx fragments */

Definition at line 78 of file at76c50x-usb.c.

#define DBG_RX_MGMT   0x00000200 /* rx mgmt frame headers */

Definition at line 65 of file at76c50x-usb.c.

#define DBG_RX_MGMT_CONTENT   0x00001000 /* rx mgmt content */

Definition at line 68 of file at76c50x-usb.c.

#define DBG_TX_DATA   0x00000010 /* tx header */

Definition at line 60 of file at76c50x-usb.c.

#define DBG_TX_DATA_CONTENT   0x00000020 /* tx content */

Definition at line 61 of file at76c50x-usb.c.

#define DBG_TX_MGMT   0x00000040 /* tx management */

Definition at line 62 of file at76c50x-usb.c.

#define DBG_URB   0x00008000 /* rx urb status, ... */

Definition at line 71 of file at76c50x-usb.c.

#define DBG_WAIT_COMPLETE   0x00200000 /* command completion */

Definition at line 77 of file at76c50x-usb.c.

#define DBG_WE_EVENTS   0x08000000 /* dump wireless events */

Definition at line 83 of file at76c50x-usb.c.

#define DFU_ABORT   6

Definition at line 297 of file at76c50x-usb.c.

#define DFU_CLRSTATUS   4

Definition at line 295 of file at76c50x-usb.c.

#define DFU_DETACH   0

Definition at line 291 of file at76c50x-usb.c.

#define DFU_DNLOAD   1

Definition at line 292 of file at76c50x-usb.c.

#define DFU_GETSTATE   5

Definition at line 296 of file at76c50x-usb.c.

#define DFU_GETSTATUS   3

Definition at line 294 of file at76c50x-usb.c.

#define DFU_UPLOAD   2

Definition at line 293 of file at76c50x-usb.c.

#define DRIVER_DESC   "Atmel at76x USB Wireless LAN Driver"

Definition at line 53 of file at76c50x-usb.c.

#define DRIVER_NAME   "at76c50x-usb"

Definition at line 51 of file at76c50x-usb.c.

#define DRIVER_VERSION   "0.17"

Definition at line 52 of file at76c50x-usb.c.

#define FW_BLOCK_SIZE   1024

Definition at line 299 of file at76c50x-usb.c.

#define MAKE_CMD_CASE (   c)    case (c): return #c

Definition at line 690 of file at76c50x-usb.c.

#define MAKE_CMD_STATUS_CASE (   c)    case (c): return #c

Definition at line 735 of file at76c50x-usb.c.

#define STATE_DETACH   0x01

Definition at line 279 of file at76c50x-usb.c.

#define STATE_DFU_DOWNLOAD_BUSY   0x04

Definition at line 282 of file at76c50x-usb.c.

#define STATE_DFU_DOWNLOAD_IDLE   0x05

Definition at line 283 of file at76c50x-usb.c.

#define STATE_DFU_DOWNLOAD_SYNC   0x03

Definition at line 281 of file at76c50x-usb.c.

#define STATE_DFU_ERROR   0x0a

Definition at line 288 of file at76c50x-usb.c.

#define STATE_DFU_IDLE   0x02

Definition at line 280 of file at76c50x-usb.c.

#define STATE_DFU_MANIFEST   0x07

Definition at line 285 of file at76c50x-usb.c.

#define STATE_DFU_MANIFEST_SYNC   0x06

Definition at line 284 of file at76c50x-usb.c.

#define STATE_DFU_MANIFEST_WAIT_RESET   0x08

Definition at line 286 of file at76c50x-usb.c.

#define STATE_DFU_UPLOAD_IDLE   0x09

Definition at line 287 of file at76c50x-usb.c.

#define STATE_IDLE   0x00

Definition at line 278 of file at76c50x-usb.c.

#define USB_DEVICE_DATA (   __ops)    .driver_info = (kernel_ulong_t)(__ops)

Definition at line 131 of file at76c50x-usb.c.

Function Documentation

DEFINE_LED_TRIGGER ( ledtrig_tx  )
MODULE_AUTHOR ( "Oliver Kurth <[email protected]>"  )
MODULE_AUTHOR ( "Joerg Albert <[email protected]>"  )
MODULE_AUTHOR ( "Alex <[email protected]>"  )
MODULE_AUTHOR ( "Nick Jones"  )
MODULE_AUTHOR ( "Balint Seeber <[email protected]>"  )
MODULE_AUTHOR ( "Pavel Roskin <[email protected]>"  )
MODULE_AUTHOR ( "Guido Guenther <[email protected]>"  )
MODULE_AUTHOR ( "Kalle Valo <[email protected]>"  )
MODULE_AUTHOR ( "Sebastian Smolorz <[email protected]>"  )
MODULE_DESCRIPTION ( DRIVER_DESC  )
MODULE_DEVICE_TABLE ( usb  ,
dev_table   
)
module_exit ( at76_mod_exit  )
MODULE_FIRMWARE ( "atmel_at76c503-i3861.bin"  )
MODULE_FIRMWARE ( "atmel_at76c503-i3863.bin"  )
MODULE_FIRMWARE ( "atmel_at76c503-rfmd.bin"  )
MODULE_FIRMWARE ( "atmel_at76c503-rfmd-acc.bin"  )
MODULE_FIRMWARE ( "atmel_at76c505-rfmd.bin"  )
MODULE_FIRMWARE ( "atmel_at76c505-rfmd2958.bin"  )
MODULE_FIRMWARE ( "atmel_at76c505a-rfmd2958.bin"  )
MODULE_FIRMWARE ( "atmel_at76c505amx-rfmd.bin"  )
module_init ( at76_mod_init  )
MODULE_LICENSE ( "GPL"  )
module_param_named ( debug  ,
at76_debug  ,
uint  ,
0600   
)
MODULE_PARM_DESC ( debug  ,
"Debugging level  
)

Variable Documentation