Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
orinoco_usb.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/signal.h>
#include <linux/errno.h>
#include <linux/poll.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/fcntl.h>
#include <linux/spinlock.h>
#include <linux/list.h>
#include <linux/usb.h>
#include <linux/timer.h>
#include <linux/netdevice.h>
#include <linux/if_arp.h>
#include <linux/etherdevice.h>
#include <linux/wireless.h>
#include <linux/firmware.h>
#include "mic.h"
#include "orinoco.h"

Go to the source code of this file.

Data Structures

struct  header_struct
 
struct  ez_usb_fw
 
struct  ezusb_packet
 
struct  ezusb_priv
 
struct  request_context
 

Macros

#define DRIVER_NAME   "orinoco_usb"
 
#define PFX   DRIVER_NAME ": "
 
#define URB_ASYNC_UNLINK   0
 
#define ENCAPS_OVERHEAD   (sizeof(encaps_hdr) + 2)
 
#define dbg(format, arg...)
 
#define err(format, arg...)   do { printk(KERN_ERR PFX format "\n", ## arg); } while (0)
 
#define USB_COMPAQ_VENDOR_ID   0x049f /* Compaq Computer Corp. */
 
#define USB_COMPAQ_WL215_ID   0x001f /* Compaq WL215 USB Adapter */
 
#define USB_COMPAQ_W200_ID   0x0076 /* Compaq W200 USB Adapter */
 
#define USB_HP_WL215_ID   0x0082 /* Compaq WL215 USB Adapter */
 
#define USB_MELCO_VENDOR_ID   0x0411
 
#define USB_BUFFALO_L11_ID   0x0006 /* BUFFALO WLI-USB-L11 */
 
#define USB_BUFFALO_L11G_WR_ID   0x000B /* BUFFALO WLI-USB-L11G-WR */
 
#define USB_BUFFALO_L11G_ID   0x000D /* BUFFALO WLI-USB-L11G */
 
#define USB_LUCENT_VENDOR_ID   0x047E /* Lucent Technologies */
 
#define USB_LUCENT_ORINOCO_ID   0x0300 /* Lucent/Agere Orinoco USB Client */
 
#define USB_AVAYA8_VENDOR_ID   0x0D98
 
#define USB_AVAYAE_VENDOR_ID   0x0D9E
 
#define USB_AVAYA_WIRELESS_ID   0x0300 /* Avaya Wireless USB Card */
 
#define USB_AGERE_VENDOR_ID   0x0D4E /* Agere Systems */
 
#define USB_AGERE_MODEL0801_ID   0x1000 /* Wireless USB Card Model 0801 */
 
#define USB_AGERE_MODEL0802_ID   0x1001 /* Wireless USB Card Model 0802 */
 
#define USB_AGERE_REBRANDED_ID   0x047A /* WLAN USB Card */
 
#define USB_ELSA_VENDOR_ID   0x05CC
 
#define USB_ELSA_AIRLANCER_ID   0x3100 /* ELSA AirLancer USB-11 */
 
#define USB_LEGEND_VENDOR_ID   0x0E7C
 
#define USB_LEGEND_JOYNET_ID   0x0300 /* Joynet WLAN USB Card */
 
#define USB_SAMSUNG_VENDOR_ID   0x04E8
 
#define USB_SAMSUNG_SEW2001U1_ID   0x5002 /* Samsung SEW-2001u Card */
 
#define USB_SAMSUNG_SEW2001U2_ID   0x5B11 /* Samsung SEW-2001u Card */
 
#define USB_SAMSUNG_SEW2003U_ID   0x7011 /* Samsung SEW-2003U Card */
 
#define USB_IGATE_VENDOR_ID   0x0681
 
#define USB_IGATE_IGATE_11M_ID   0x0012 /* I-GATE 11M USB Card */
 
#define USB_FUJITSU_VENDOR_ID   0x0BF8
 
#define USB_FUJITSU_E1100_ID   0x1002 /* connect2AIR WLAN E-1100 USB */
 
#define USB_2WIRE_VENDOR_ID   0x1630
 
#define USB_2WIRE_WIRELESS_ID   0xff81 /* 2Wire Wireless USB adapter */
 
#define EZUSB_REQUEST_FW_TRANS   0xA0
 
#define EZUSB_REQUEST_TRIGER   0xAA
 
#define EZUSB_REQUEST_TRIG_AC   0xAC
 
#define EZUSB_CPUCS_REG   0x7F92
 
#define EZUSB_RID_TX   0x0700
 
#define EZUSB_RID_RX   0x0701
 
#define EZUSB_RID_INIT1   0x0702
 
#define EZUSB_RID_ACK   0x0710
 
#define EZUSB_RID_READ_PDA   0x0800
 
#define EZUSB_RID_PROG_INIT   0x0852
 
#define EZUSB_RID_PROG_SET_ADDR   0x0853
 
#define EZUSB_RID_PROG_BYTES   0x0854
 
#define EZUSB_RID_PROG_END   0x0855
 
#define EZUSB_RID_DOCMD   0x0860
 
#define EZUSB_IS_INFO(id)   ((id >= 0xF000) && (id <= 0xF2FF))
 
#define EZUSB_MAGIC   0x0210
 
#define EZUSB_FRAME_DATA   1
 
#define EZUSB_FRAME_CONTROL   2
 
#define DEF_TIMEOUT   (3 * HZ)
 
#define BULK_BUF_SIZE   2048
 
#define MAX_DL_SIZE   (BULK_BUF_SIZE - sizeof(struct ezusb_packet))
 
#define FW_BUF_SIZE   64
 
#define FW_VAR_OFFSET_PTR   0x359
 
#define FW_VAR_VALUE   0
 
#define FW_HOLE_START   0x100
 
#define FW_HOLE_END   0x300
 

Enumerations

enum  ezusb_state {
  EZUSB_CTX_START, EZUSB_CTX_QUEUED, EZUSB_CTX_REQ_SUBMITTED, EZUSB_CTX_REQ_COMPLETE,
  EZUSB_CTX_RESP_RECEIVED, EZUSB_CTX_REQ_TIMEOUT, EZUSB_CTX_REQ_FAILED, EZUSB_CTX_RESP_TIMEOUT,
  EZUSB_CTX_REQSUBMIT_FAIL, EZUSB_CTX_COMPLETE
}
 

Functions

 module_param (debug, int, 0644)
 
 MODULE_PARM_DESC (debug,"Debug enabled or not")
 
 MODULE_FIRMWARE ("orinoco_ezusb_fw")
 
 MODULE_DEVICE_TABLE (usb, ezusb_table)
 
 module_usb_driver (orinoco_driver)
 
 MODULE_AUTHOR ("Manuel Estrada Sainz")
 
 MODULE_DESCRIPTION ("Driver for Orinoco wireless LAN cards using EZUSB bridge")
 
 MODULE_LICENSE ("Dual MPL/GPL")
 

Variables

struct header_struct __packed
 

Macro Definition Documentation

#define BULK_BUF_SIZE   2048

Definition at line 204 of file orinoco_usb.c.

#define dbg (   format,
  arg... 
)
Value:
do { if (debug) printk(KERN_DEBUG PFX "%s: " format "\n", \
__func__ , ## arg); } while (0)

Definition at line 112 of file orinoco_usb.c.

#define DEF_TIMEOUT   (3 * HZ)

Definition at line 202 of file orinoco_usb.c.

#define DRIVER_NAME   "orinoco_usb"

Definition at line 46 of file orinoco_usb.c.

#define ENCAPS_OVERHEAD   (sizeof(encaps_hdr) + 2)

Definition at line 78 of file orinoco_usb.c.

#define err (   format,
  arg... 
)    do { printk(KERN_ERR PFX format "\n", ## arg); } while (0)

Definition at line 116 of file orinoco_usb.c.

#define EZUSB_CPUCS_REG   0x7F92

Definition at line 181 of file orinoco_usb.c.

#define EZUSB_FRAME_CONTROL   2

Definition at line 200 of file orinoco_usb.c.

#define EZUSB_FRAME_DATA   1

Definition at line 199 of file orinoco_usb.c.

#define EZUSB_IS_INFO (   id)    ((id >= 0xF000) && (id <= 0xF2FF))

Definition at line 195 of file orinoco_usb.c.

#define EZUSB_MAGIC   0x0210

Definition at line 197 of file orinoco_usb.c.

#define EZUSB_REQUEST_FW_TRANS   0xA0

Definition at line 178 of file orinoco_usb.c.

#define EZUSB_REQUEST_TRIG_AC   0xAC

Definition at line 180 of file orinoco_usb.c.

#define EZUSB_REQUEST_TRIGER   0xAA

Definition at line 179 of file orinoco_usb.c.

#define EZUSB_RID_ACK   0x0710

Definition at line 186 of file orinoco_usb.c.

#define EZUSB_RID_DOCMD   0x0860

Definition at line 192 of file orinoco_usb.c.

#define EZUSB_RID_INIT1   0x0702

Definition at line 185 of file orinoco_usb.c.

#define EZUSB_RID_PROG_BYTES   0x0854

Definition at line 190 of file orinoco_usb.c.

#define EZUSB_RID_PROG_END   0x0855

Definition at line 191 of file orinoco_usb.c.

#define EZUSB_RID_PROG_INIT   0x0852

Definition at line 188 of file orinoco_usb.c.

#define EZUSB_RID_PROG_SET_ADDR   0x0853

Definition at line 189 of file orinoco_usb.c.

#define EZUSB_RID_READ_PDA   0x0800

Definition at line 187 of file orinoco_usb.c.

#define EZUSB_RID_RX   0x0701

Definition at line 184 of file orinoco_usb.c.

#define EZUSB_RID_TX   0x0700

Definition at line 183 of file orinoco_usb.c.

#define FW_BUF_SIZE   64

Definition at line 208 of file orinoco_usb.c.

#define FW_HOLE_END   0x300

Definition at line 212 of file orinoco_usb.c.

#define FW_HOLE_START   0x100

Definition at line 211 of file orinoco_usb.c.

#define FW_VAR_OFFSET_PTR   0x359

Definition at line 209 of file orinoco_usb.c.

#define FW_VAR_VALUE   0

Definition at line 210 of file orinoco_usb.c.

#define MAX_DL_SIZE   (BULK_BUF_SIZE - sizeof(struct ezusb_packet))

Definition at line 206 of file orinoco_usb.c.

#define PFX   DRIVER_NAME ": "

Definition at line 47 of file orinoco_usb.c.

#define URB_ASYNC_UNLINK   0

Definition at line 73 of file orinoco_usb.c.

#define USB_2WIRE_VENDOR_ID   0x1630

Definition at line 174 of file orinoco_usb.c.

#define USB_2WIRE_WIRELESS_ID   0xff81 /* 2Wire Wireless USB adapter */

Definition at line 175 of file orinoco_usb.c.

#define USB_AGERE_MODEL0801_ID   0x1000 /* Wireless USB Card Model 0801 */

Definition at line 153 of file orinoco_usb.c.

#define USB_AGERE_MODEL0802_ID   0x1001 /* Wireless USB Card Model 0802 */

Definition at line 154 of file orinoco_usb.c.

#define USB_AGERE_REBRANDED_ID   0x047A /* WLAN USB Card */

Definition at line 155 of file orinoco_usb.c.

#define USB_AGERE_VENDOR_ID   0x0D4E /* Agere Systems */

Definition at line 152 of file orinoco_usb.c.

#define USB_AVAYA8_VENDOR_ID   0x0D98

Definition at line 148 of file orinoco_usb.c.

#define USB_AVAYA_WIRELESS_ID   0x0300 /* Avaya Wireless USB Card */

Definition at line 150 of file orinoco_usb.c.

#define USB_AVAYAE_VENDOR_ID   0x0D9E

Definition at line 149 of file orinoco_usb.c.

#define USB_BUFFALO_L11_ID   0x0006 /* BUFFALO WLI-USB-L11 */

Definition at line 141 of file orinoco_usb.c.

#define USB_BUFFALO_L11G_ID   0x000D /* BUFFALO WLI-USB-L11G */

Definition at line 143 of file orinoco_usb.c.

#define USB_BUFFALO_L11G_WR_ID   0x000B /* BUFFALO WLI-USB-L11G-WR */

Definition at line 142 of file orinoco_usb.c.

#define USB_COMPAQ_VENDOR_ID   0x049f /* Compaq Computer Corp. */

Definition at line 135 of file orinoco_usb.c.

#define USB_COMPAQ_W200_ID   0x0076 /* Compaq W200 USB Adapter */

Definition at line 137 of file orinoco_usb.c.

#define USB_COMPAQ_WL215_ID   0x001f /* Compaq WL215 USB Adapter */

Definition at line 136 of file orinoco_usb.c.

#define USB_ELSA_AIRLANCER_ID   0x3100 /* ELSA AirLancer USB-11 */

Definition at line 158 of file orinoco_usb.c.

#define USB_ELSA_VENDOR_ID   0x05CC

Definition at line 157 of file orinoco_usb.c.

#define USB_FUJITSU_E1100_ID   0x1002 /* connect2AIR WLAN E-1100 USB */

Definition at line 172 of file orinoco_usb.c.

#define USB_FUJITSU_VENDOR_ID   0x0BF8

Definition at line 171 of file orinoco_usb.c.

#define USB_HP_WL215_ID   0x0082 /* Compaq WL215 USB Adapter */

Definition at line 138 of file orinoco_usb.c.

#define USB_IGATE_IGATE_11M_ID   0x0012 /* I-GATE 11M USB Card */

Definition at line 169 of file orinoco_usb.c.

#define USB_IGATE_VENDOR_ID   0x0681

Definition at line 168 of file orinoco_usb.c.

#define USB_LEGEND_JOYNET_ID   0x0300 /* Joynet WLAN USB Card */

Definition at line 161 of file orinoco_usb.c.

#define USB_LEGEND_VENDOR_ID   0x0E7C

Definition at line 160 of file orinoco_usb.c.

#define USB_LUCENT_ORINOCO_ID   0x0300 /* Lucent/Agere Orinoco USB Client */

Definition at line 146 of file orinoco_usb.c.

#define USB_LUCENT_VENDOR_ID   0x047E /* Lucent Technologies */

Definition at line 145 of file orinoco_usb.c.

#define USB_MELCO_VENDOR_ID   0x0411

Definition at line 140 of file orinoco_usb.c.

#define USB_SAMSUNG_SEW2001U1_ID   0x5002 /* Samsung SEW-2001u Card */

Definition at line 164 of file orinoco_usb.c.

#define USB_SAMSUNG_SEW2001U2_ID   0x5B11 /* Samsung SEW-2001u Card */

Definition at line 165 of file orinoco_usb.c.

#define USB_SAMSUNG_SEW2003U_ID   0x7011 /* Samsung SEW-2003U Card */

Definition at line 166 of file orinoco_usb.c.

#define USB_SAMSUNG_VENDOR_ID   0x04E8

Definition at line 163 of file orinoco_usb.c.

Enumeration Type Documentation

Enumerator:
EZUSB_CTX_START 
EZUSB_CTX_QUEUED 
EZUSB_CTX_REQ_SUBMITTED 
EZUSB_CTX_REQ_COMPLETE 
EZUSB_CTX_RESP_RECEIVED 
EZUSB_CTX_REQ_TIMEOUT 
EZUSB_CTX_REQ_FAILED 
EZUSB_CTX_RESP_TIMEOUT 
EZUSB_CTX_REQSUBMIT_FAIL 
EZUSB_CTX_COMPLETE 

Definition at line 271 of file orinoco_usb.c.

Function Documentation

MODULE_AUTHOR ( "Manuel Estrada Sainz"  )
MODULE_DESCRIPTION ( "Driver for Orinoco wireless LAN cards using EZUSB bridge )
MODULE_DEVICE_TABLE ( usb  ,
ezusb_table   
)
MODULE_FIRMWARE ( "orinoco_ezusb_fw"  )
MODULE_LICENSE ( "Dual MPL/GPL"  )
module_param ( debug  ,
int  ,
0644   
)
MODULE_PARM_DESC ( debug  ,
"Debug enabled or not"   
)
module_usb_driver ( orinoco_driver  )

Variable Documentation