Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions | Variables
zd_usb.c File Reference
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/firmware.h>
#include <linux/device.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/skbuff.h>
#include <linux/usb.h>
#include <linux/workqueue.h>
#include <linux/module.h>
#include <net/mac80211.h>
#include <asm/unaligned.h>
#include "zd_def.h"
#include "zd_mac.h"
#include "zd_usb.h"

Go to the source code of this file.

Macros

#define FW_ZD1211_PREFIX   "zd1211/zd1211_"
 
#define FW_ZD1211B_PREFIX   "zd1211/zd1211b_"
 
#define MAX_TRANSFER_SIZE   (USB_MAX_TRANSFER_SIZE & ~1)
 
#define urb_dev(urb)   (&(urb)->dev->dev)
 
#define print_id(udev)   do { } while (0)
 

Enumerations

enum  upload_code_flags { REBOOT = 1 }
 

Functions

 MODULE_LICENSE ("GPL")
 
 MODULE_DESCRIPTION ("USB driver for devices with the ZD1211 chip.")
 
 MODULE_AUTHOR ("Ulrich Kunitz")
 
 MODULE_AUTHOR ("Daniel Drake")
 
 MODULE_VERSION ("1.0")
 
 MODULE_DEVICE_TABLE (usb, usb_ids)
 
 MODULE_FIRMWARE (FW_ZD1211B_PREFIX"ur")
 
 MODULE_FIRMWARE (FW_ZD1211_PREFIX"ur")
 
 MODULE_FIRMWARE (FW_ZD1211B_PREFIX"ub")
 
 MODULE_FIRMWARE (FW_ZD1211_PREFIX"ub")
 
 MODULE_FIRMWARE (FW_ZD1211B_PREFIX"uphr")
 
 MODULE_FIRMWARE (FW_ZD1211_PREFIX"uphr")
 
int zd_usb_read_fw (struct zd_usb *usb, zd_addr_t addr, u8 *data, u16 len)
 
int zd_usb_enable_int (struct zd_usb *usb)
 
void zd_usb_disable_int (struct zd_usb *usb)
 
int zd_usb_enable_rx (struct zd_usb *usb)
 
void zd_usb_disable_rx (struct zd_usb *usb)
 
void zd_usb_disable_tx (struct zd_usb *usb)
 
void zd_usb_enable_tx (struct zd_usb *usb)
 
int zd_usb_tx (struct zd_usb *usb, struct sk_buff *skb)
 
void zd_tx_watchdog_enable (struct zd_usb *usb)
 
void zd_tx_watchdog_disable (struct zd_usb *usb)
 
void zd_usb_reset_rx_idle_timer (struct zd_usb *usb)
 
void zd_usb_init (struct zd_usb *usb, struct ieee80211_hw *hw, struct usb_interface *intf)
 
void zd_usb_clear (struct zd_usb *usb)
 
int zd_usb_scnprint_id (struct zd_usb *usb, char *buffer, size_t size)
 
int zd_usb_init_hw (struct zd_usb *usb)
 
 module_init (usb_init)
 
 module_exit (usb_exit)
 
int zd_usb_ioread16v (struct zd_usb *usb, u16 *values, const zd_addr_t *addresses, unsigned int count)
 
void zd_usb_iowrite16v_async_start (struct zd_usb *usb)
 
int zd_usb_iowrite16v_async_end (struct zd_usb *usb, unsigned int timeout)
 
int zd_usb_iowrite16v_async (struct zd_usb *usb, const struct zd_ioreq16 *ioreqs, unsigned int count)
 
int zd_usb_iowrite16v (struct zd_usb *usb, const struct zd_ioreq16 *ioreqs, unsigned int count)
 
int zd_usb_rfwrite (struct zd_usb *usb, u32 value, u8 bits)
 

Variables

struct workqueue_structzd_workqueue
 

Macro Definition Documentation

#define FW_ZD1211_PREFIX   "zd1211/zd1211_"

Definition at line 112 of file zd_usb.c.

#define FW_ZD1211B_PREFIX   "zd1211/zd1211b_"

Definition at line 113 of file zd_usb.c.

#define MAX_TRANSFER_SIZE   (USB_MAX_TRANSFER_SIZE & ~1)

Definition at line 146 of file zd_usb.c.

#define print_id (   udev)    do { } while (0)

Definition at line 1271 of file zd_usb.c.

#define urb_dev (   urb)    (&(urb)->dev->dev)

Definition at line 370 of file zd_usb.c.

Enumeration Type Documentation

Enumerator:
REBOOT 

Definition at line 141 of file zd_usb.c.

Function Documentation

MODULE_AUTHOR ( "Ulrich Kunitz"  )
MODULE_AUTHOR ( "Daniel Drake"  )
MODULE_DESCRIPTION ( "USB driver for devices with the ZD1211 chip."  )
MODULE_DEVICE_TABLE ( usb  ,
usb_ids   
)
module_exit ( usb_exit  )
MODULE_FIRMWARE ( FW_ZD1211B_PREFIX"ur"  )
MODULE_FIRMWARE ( FW_ZD1211_PREFIX"ur"  )
MODULE_FIRMWARE ( FW_ZD1211B_PREFIX"ub"  )
MODULE_FIRMWARE ( FW_ZD1211_PREFIX"ub"  )
MODULE_FIRMWARE ( FW_ZD1211B_PREFIX"uphr"  )
MODULE_FIRMWARE ( FW_ZD1211_PREFIX"uphr"  )
module_init ( usb_init  )
MODULE_LICENSE ( "GPL"  )
MODULE_VERSION ( "1.0"  )
void zd_tx_watchdog_disable ( struct zd_usb usb)

Definition at line 1130 of file zd_usb.c.

void zd_tx_watchdog_enable ( struct zd_usb usb)

Definition at line 1118 of file zd_usb.c.

void zd_usb_clear ( struct zd_usb usb)

Definition at line 1224 of file zd_usb.c.

void zd_usb_disable_int ( struct zd_usb usb)

Definition at line 590 of file zd_usb.c.

void zd_usb_disable_rx ( struct zd_usb usb)

Definition at line 853 of file zd_usb.c.

void zd_usb_disable_tx ( struct zd_usb usb)

zd_usb_disable_tx - disable transmission : the zd1211rw-private USB structure

Frees all URBs in the free list and marks the transmission as disabled.

Definition at line 894 of file zd_usb.c.

int zd_usb_enable_int ( struct zd_usb usb)

Definition at line 527 of file zd_usb.c.

int zd_usb_enable_rx ( struct zd_usb usb)

Definition at line 812 of file zd_usb.c.

void zd_usb_enable_tx ( struct zd_usb usb)

zd_usb_enable_tx - enables transmission : a &struct zd_usb pointer

This function enables transmission and prepares the &zd_usb_tx data structure.

Definition at line 922 of file zd_usb.c.

void zd_usb_init ( struct zd_usb usb,
struct ieee80211_hw hw,
struct usb_interface intf 
)

Definition at line 1212 of file zd_usb.c.

int zd_usb_init_hw ( struct zd_usb usb)

Definition at line 1326 of file zd_usb.c.

int zd_usb_ioread16v ( struct zd_usb usb,
u16 values,
const zd_addr_t addresses,
unsigned int  count 
)

Definition at line 1710 of file zd_usb.c.

int zd_usb_iowrite16v ( struct zd_usb usb,
const struct zd_ioreq16 ioreqs,
unsigned int  count 
)

Definition at line 1963 of file zd_usb.c.

int zd_usb_iowrite16v_async ( struct zd_usb usb,
const struct zd_ioreq16 ioreqs,
unsigned int  count 
)

Definition at line 1879 of file zd_usb.c.

int zd_usb_iowrite16v_async_end ( struct zd_usb usb,
unsigned int  timeout 
)

Definition at line 1843 of file zd_usb.c.

void zd_usb_iowrite16v_async_start ( struct zd_usb usb)

Definition at line 1830 of file zd_usb.c.

int zd_usb_read_fw ( struct zd_usb usb,
zd_addr_t  addr,
u8 data,
u16  len 
)

Definition at line 339 of file zd_usb.c.

void zd_usb_reset_rx_idle_timer ( struct zd_usb usb)

Definition at line 1163 of file zd_usb.c.

int zd_usb_rfwrite ( struct zd_usb usb,
u32  value,
u8  bits 
)

Definition at line 1977 of file zd_usb.c.

int zd_usb_scnprint_id ( struct zd_usb usb,
char buffer,
size_t  size 
)

Definition at line 1255 of file zd_usb.c.

int zd_usb_tx ( struct zd_usb usb,
struct sk_buff skb 
)

zd_usb_tx: initiates transfer of a frame of the device

: the zd1211rw-private USB structure : a &struct sk_buff pointer

This function tranmits a frame to the device. It doesn't wait for completion. The frame must contain the control set and have all the control set information available.

The function returns 0 if the transfer has been successfully initiated.

Definition at line 1030 of file zd_usb.c.

Variable Documentation

struct workqueue_struct* zd_workqueue

Definition at line 1547 of file zd_usb.c.