Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
drv.c File Reference
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/poll.h>
#include <asm/uaccess.h>
#include <linux/jiffies.h>
#include <linux/version.h>
#include "csr_wifi_hip_unifiversion.h"
#include "unifi_priv.h"
#include "csr_wifi_hip_conversions.h"
#include "unifi_native.h"

Go to the source code of this file.

Macros

#define UF_MAX_SIG_IDS   128 /* Impose a sensible limit */
 

Functions

 MODULE_DESCRIPTION ("CSR UniFi (SDIO)")
 
 module_param (buswidth, int, S_IRUGO|S_IWUSR)
 
 module_param (sdio_clock, int, S_IRUGO|S_IWUSR)
 
 module_param (unifi_debug, int, S_IRUGO|S_IWUSR)
 
 module_param_array (fw_init, int, NULL, S_IRUGO|S_IWUSR)
 
 module_param (use_5g, int, S_IRUGO|S_IWUSR)
 
 module_param (led_mask, int, S_IRUGO|S_IWUSR)
 
 module_param (disable_hw_reset, int, S_IRUGO|S_IWUSR)
 
 module_param (disable_power_control, int, S_IRUGO|S_IWUSR)
 
 module_param (enable_wol, int, S_IRUGO|S_IWUSR)
 
 module_param (sdio_block_size, int, S_IRUGO|S_IWUSR)
 
 module_param (sdio_byte_mode, int, S_IRUGO|S_IWUSR)
 
 module_param (coredump_max, int, S_IRUGO|S_IWUSR)
 
 module_param (run_bh_once, int, S_IRUGO|S_IWUSR)
 
 module_param (bh_priority, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (buswidth,"SDIO bus width (0=default), set 1 for 1-bit or 4 for 4-bit mode")
 
 MODULE_PARM_DESC (sdio_clock,"SDIO bus frequency in kHz, (default = 50 MHz)")
 
 MODULE_PARM_DESC (unifi_debug,"Diagnostic reporting level")
 
 MODULE_PARM_DESC (fw_init,"Set to 0 to prevent f/w initialization on error")
 
 MODULE_PARM_DESC (use_5g,"Use the 5G (802.11a) radio band")
 
 MODULE_PARM_DESC (led_mask,"LED mask flags")
 
 MODULE_PARM_DESC (disable_hw_reset,"Set to 1 to disable hardware reset")
 
 MODULE_PARM_DESC (disable_power_control,"Set to 1 to disable SDIO power control")
 
 MODULE_PARM_DESC (enable_wol,"Enable wake-on-wlan function 0=off, 1=SDIO, 2=PIO")
 
 MODULE_PARM_DESC (sdio_block_size,"Set to override SDIO block size")
 
 MODULE_PARM_DESC (sdio_byte_mode,"Set to 1 for byte mode SDIO")
 
 MODULE_PARM_DESC (coredump_max,"Number of chip mini-coredump buffers to allocate")
 
 MODULE_PARM_DESC (run_bh_once,"Run BH only when firmware interrupts")
 
 MODULE_PARM_DESC (bh_priority,"Modify the BH thread priority")
 
 DEFINE_SEMAPHORE (udi_mutex)
 
s32 CsrHipResultToStatus (CsrResult csrResult)
 
int uf_create_device_nodes (unifi_priv_t *priv, int bus_id)
 
void uf_destroy_device_nodes (unifi_priv_t *priv)
 
int __init unifi_load (void)
 
void __exit unifi_unload (void)
 
 module_init (unifi_load)
 
 module_exit (unifi_unload)
 
 MODULE_DESCRIPTION ("UniFi Device driver")
 
 MODULE_AUTHOR ("Cambridge Silicon Radio Ltd.")
 
 MODULE_LICENSE ("GPL and additional rights")
 

Variables

int buswidth = 0
 
int sdio_clock = 50000
 
int unifi_debug = 0
 
int fw_init [MAX_UNIFI_DEVS] = {-1, -1}
 
int use_5g = 0
 
int led_mask = 0
 
int disable_hw_reset = 0
 
int disable_power_control = 0
 
int enable_wol = UNIFI_WOL_OFF
 
int sdio_block_size = -1
 
int sdio_byte_mode = 0
 
int coredump_max = CSR_WIFI_HIP_NUM_COREDUMP_BUFFERS
 
int run_bh_once = -1
 
int bh_priority = -1
 

Macro Definition Documentation

#define UF_MAX_SIG_IDS   128 /* Impose a sensible limit */

Function Documentation

s32 CsrHipResultToStatus ( CsrResult  csrResult)

Definition at line 128 of file drv.c.

DEFINE_SEMAPHORE ( udi_mutex  )
MODULE_AUTHOR ( "Cambridge Silicon Radio Ltd."  )
MODULE_DESCRIPTION ( "CSR UniFi (SDIO)"  )
MODULE_DESCRIPTION ( "UniFi Device driver )
module_exit ( unifi_unload  )
module_init ( unifi_load  )
MODULE_LICENSE ( "GPL and additional rights"  )
module_param ( buswidth  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( sdio_clock  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( unifi_debug  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( use_5g  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( led_mask  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( disable_hw_reset  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( disable_power_control  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( enable_wol  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( sdio_block_size  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( sdio_byte_mode  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( coredump_max  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( run_bh_once  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param ( bh_priority  ,
int  ,
S_IRUGO S_IWUSR 
)
module_param_array ( fw_init  ,
int  ,
NULL  ,
S_IRUGO S_IWUSR 
)
MODULE_PARM_DESC ( buswidth  ,
"SDIO bus width   0=default,
set 1 for 1-bit or 4 for 4-bit mode  
)
MODULE_PARM_DESC ( sdio_clock  ,
"SDIO bus frequency in  kHz,
(default=50 MHz)"   
)
MODULE_PARM_DESC ( unifi_debug  ,
"Diagnostic reporting level  
)
MODULE_PARM_DESC ( fw_init  ,
"Set to 0 to prevent f/w initialization on error  
)
MODULE_PARM_DESC ( use_5g  ,
"Use the 5G (802.11a) radio band"   
)
MODULE_PARM_DESC ( led_mask  ,
"LED mask flags  
)
MODULE_PARM_DESC ( disable_hw_reset  ,
"Set to 1 to disable hardware reset  
)
MODULE_PARM_DESC ( disable_power_control  ,
"Set to 1 to disable SDIO power control  
)
MODULE_PARM_DESC ( enable_wol  ,
"Enable wake-on-wlan function  0 = off,
= SDIO 
)
MODULE_PARM_DESC ( sdio_block_size  ,
"Set to override SDIO block size  
)
MODULE_PARM_DESC ( sdio_byte_mode  ,
"Set to 1 for byte mode SDIO"   
)
MODULE_PARM_DESC ( coredump_max  ,
"Number of chip mini-coredump buffers to allocate"   
)
MODULE_PARM_DESC ( run_bh_once  ,
"Run BH only when firmware interrupts"   
)
MODULE_PARM_DESC ( bh_priority  ,
"Modify the BH thread priority  
)
int uf_create_device_nodes ( unifi_priv_t priv,
int  bus_id 
)

Definition at line 1999 of file drv.c.

void uf_destroy_device_nodes ( unifi_priv_t priv)

Definition at line 2060 of file drv.c.

int __init unifi_load ( void  )

Definition at line 2144 of file drv.c.

void __exit unifi_unload ( void  )

Definition at line 2220 of file drv.c.

Variable Documentation

int bh_priority = -1

Definition at line 63 of file drv.c.

int buswidth = 0

Definition at line 46 of file drv.c.

Definition at line 61 of file drv.c.

int disable_hw_reset = 0

Definition at line 53 of file drv.c.

int disable_power_control = 0

Definition at line 54 of file drv.c.

int enable_wol = UNIFI_WOL_OFF

Definition at line 55 of file drv.c.

int fw_init[MAX_UNIFI_DEVS] = {-1, -1}

Definition at line 50 of file drv.c.

int led_mask = 0

Definition at line 52 of file drv.c.

int run_bh_once = -1

Definition at line 62 of file drv.c.

int sdio_block_size = -1

Definition at line 59 of file drv.c.

int sdio_byte_mode = 0

Definition at line 60 of file drv.c.

int sdio_clock = 50000

Definition at line 47 of file drv.c.

int unifi_debug = 0

Definition at line 48 of file drv.c.

int use_5g = 0

Definition at line 51 of file drv.c.