Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
rndis_wlan.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
#include <linux/workqueue.h>
#include <linux/mutex.h>
#include <linux/mii.h>
#include <linux/usb.h>
#include <linux/usb/cdc.h>
#include <linux/ieee80211.h>
#include <linux/if_arp.h>
#include <linux/ctype.h>
#include <linux/spinlock.h>
#include <linux/slab.h>
#include <net/cfg80211.h>
#include <linux/usb/usbnet.h>
#include <linux/usb/rndis_host.h>

Go to the source code of this file.

Data Structures

struct  ndis_80211_auth_request
 
struct  ndis_80211_pmkid_candidate
 
struct  ndis_80211_pmkid_cand_list
 
struct  ndis_80211_status_indication
 
struct  ndis_80211_ssid
 
struct  ndis_80211_conf_freq_hop
 
struct  ndis_80211_conf
 
struct  ndis_80211_bssid_ex
 
struct  ndis_80211_bssid_list_ex
 
struct  ndis_80211_fixed_ies
 
struct  ndis_80211_wep_key
 
struct  ndis_80211_key
 
struct  ndis_80211_remove_key
 
struct  ndis_config_param
 
struct  ndis_80211_assoc_info
 
struct  ndis_80211_assoc_info::req_ie
 
struct  ndis_80211_assoc_info::resp_ie
 
struct  ndis_80211_auth_encr_pair
 
struct  ndis_80211_capability
 
struct  ndis_80211_bssid_info
 
struct  ndis_80211_pmkid
 
struct  rndis_wlan_encr_key
 
struct  rndis_wlan_private
 

Macros

#define WL_NOISE   -96 /* typical noise level in dBm */
 
#define WL_SIGMAX   -32 /* typical maximum signal level in dBm */
 
#define BCM4320_DEFAULT_TXPOWER_DBM_100   13
 
#define BCM4320_DEFAULT_TXPOWER_DBM_75   12
 
#define BCM4320_DEFAULT_TXPOWER_DBM_50   10
 
#define BCM4320_DEFAULT_TXPOWER_DBM_25   7
 
#define RNDIS_UNKNOWN   0
 
#define RNDIS_BCM4320A   1
 
#define RNDIS_BCM4320B   2
 
#define NDIS_802_11_LENGTH_SSID   32
 
#define NDIS_802_11_LENGTH_RATES   8
 
#define NDIS_802_11_LENGTH_RATES_EX   16
 
#define CAP_MODE_80211A   1
 
#define CAP_MODE_80211B   2
 
#define CAP_MODE_80211G   4
 
#define CAP_MODE_MASK   7
 
#define WORK_LINK_UP   (1<<0)
 
#define WORK_LINK_DOWN   (1<<1)
 
#define WORK_SET_MULTICAST_LIST   (1<<2)
 
#define RNDIS_WLAN_ALG_NONE   0
 
#define RNDIS_WLAN_ALG_WEP   (1<<0)
 
#define RNDIS_WLAN_ALG_TKIP   (1<<1)
 
#define RNDIS_WLAN_ALG_CCMP   (1<<2)
 
#define RNDIS_WLAN_NUM_KEYS   4
 
#define RNDIS_WLAN_KEY_MGMT_NONE   0
 
#define RNDIS_WLAN_KEY_MGMT_802_1X   (1<<0)
 
#define RNDIS_WLAN_KEY_MGMT_PSK   (1<<1)
 
#define COMMAND_BUFFER_SIZE   (CONTROL_BUFFER_SIZE + sizeof(struct rndis_set))
 
#define SCAN_DELAY_JIFFIES   (6 * HZ)
 
#define DEVICE_POLLER_JIFFIES   (HZ)
 
#define RNDIS_MASTER_INTERFACE
 

Enumerations

enum  ndis_80211_net_type { NDIS_80211_TYPE_FREQ_HOP, NDIS_80211_TYPE_DIRECT_SEQ, NDIS_80211_TYPE_OFDM_A, NDIS_80211_TYPE_OFDM_G }
 
enum  ndis_80211_net_infra { NDIS_80211_INFRA_ADHOC, NDIS_80211_INFRA_INFRA, NDIS_80211_INFRA_AUTO_UNKNOWN }
 
enum  ndis_80211_auth_mode {
  NDIS_80211_AUTH_OPEN, NDIS_80211_AUTH_SHARED, NDIS_80211_AUTH_AUTO_SWITCH, NDIS_80211_AUTH_WPA,
  NDIS_80211_AUTH_WPA_PSK, NDIS_80211_AUTH_WPA_NONE, NDIS_80211_AUTH_WPA2, NDIS_80211_AUTH_WPA2_PSK
}
 
enum  ndis_80211_encr_status {
  NDIS_80211_ENCR_WEP_ENABLED, NDIS_80211_ENCR_DISABLED, NDIS_80211_ENCR_WEP_KEY_ABSENT, NDIS_80211_ENCR_NOT_SUPPORTED,
  NDIS_80211_ENCR_TKIP_ENABLED, NDIS_80211_ENCR_TKIP_KEY_ABSENT, NDIS_80211_ENCR_CCMP_ENABLED, NDIS_80211_ENCR_CCMP_KEY_ABSENT
}
 
enum  ndis_80211_priv_filter { NDIS_80211_PRIV_ACCEPT_ALL, NDIS_80211_PRIV_8021X_WEP }
 
enum  ndis_80211_status_type { NDIS_80211_STATUSTYPE_AUTHENTICATION, NDIS_80211_STATUSTYPE_MEDIASTREAMMODE, NDIS_80211_STATUSTYPE_PMKID_CANDIDATELIST, NDIS_80211_STATUSTYPE_RADIOSTATE }
 
enum  ndis_80211_media_stream_mode { NDIS_80211_MEDIA_STREAM_OFF, NDIS_80211_MEDIA_STREAM_ON }
 
enum  ndis_80211_radio_status { NDIS_80211_RADIO_STATUS_ON, NDIS_80211_RADIO_STATUS_HARDWARE_OFF, NDIS_80211_RADIO_STATUS_SOFTWARE_OFF }
 
enum  ndis_80211_addkey_bits { NDIS_80211_ADDKEY_8021X_AUTH = cpu_to_le32(1 << 28), NDIS_80211_ADDKEY_SET_INIT_RECV_SEQ = cpu_to_le32(1 << 29), NDIS_80211_ADDKEY_PAIRWISE_KEY = cpu_to_le32(1 << 30), NDIS_80211_ADDKEY_TRANSMIT_KEY = cpu_to_le32(1 << 31) }
 
enum  ndis_80211_addwep_bits { NDIS_80211_ADDWEP_PERCLIENT_KEY = cpu_to_le32(1 << 30), NDIS_80211_ADDWEP_TRANSMIT_KEY = cpu_to_le32(1 << 31) }
 
enum  ndis_80211_power_mode { NDIS_80211_POWER_MODE_CAM, NDIS_80211_POWER_MODE_MAX_PSP, NDIS_80211_POWER_MODE_FAST_PSP }
 
enum  ndis_80211_pmkid_cand_list_flag_bits { NDIS_80211_PMKID_CAND_PREAUTH = cpu_to_le32(1 << 0) }
 

Functions

 module_param_string (country, modparam_country, 4, 0444)
 
 MODULE_PARM_DESC (country,"Country code (ISO 3166-1 alpha-2), default: EU")
 
 module_param_named (frameburst, modparam_frameburst, int, 0444)
 
 MODULE_PARM_DESC (frameburst,"enable frame bursting (default: on)")
 
 module_param_named (afterburner, modparam_afterburner, int, 0444)
 
 MODULE_PARM_DESC (afterburner,"enable afterburner aka '125 High Speed Mode' (default: off)")
 
 module_param_named (power_save, modparam_power_save, int, 0444)
 
 MODULE_PARM_DESC (power_save,"set power save mode: 0=off, 1=on, 2=fast (default: off)")
 
 module_param_named (power_output, modparam_power_output, int, 0444)
 
 MODULE_PARM_DESC (power_output,"set power output: 0=25%, 1=50%, 2=75%, 3=100% (default: 100%)")
 
 module_param_named (roamtrigger, modparam_roamtrigger, int, 0444)
 
 MODULE_PARM_DESC (roamtrigger,"set roaming dBm trigger: -80=optimize for distance, ""-60=bandwidth (default: -70)")
 
 module_param_named (roamdelta, modparam_roamdelta, int, 0444)
 
 MODULE_PARM_DESC (roamdelta,"set roaming tendency: 0=aggressive, 1=moderate, ""2=conservative (default: moderate)")
 
 module_param_named (workaround_interval, modparam_workaround_interval, int, 0444)
 
 MODULE_PARM_DESC (workaround_interval,"set stall workaround interval in msecs (0=disabled) (default: 0)")
 
 MODULE_DEVICE_TABLE (usb, products)
 
 module_usb_driver (rndis_wlan_driver)
 
 MODULE_AUTHOR ("Bjorge Dijkstra")
 
 MODULE_AUTHOR ("Jussi Kivilinna")
 
 MODULE_DESCRIPTION ("Driver for RNDIS based USB Wireless adapters")
 
 MODULE_LICENSE ("GPL")
 

Variables

struct ndis_80211_auth_request __packed
 

Macro Definition Documentation

#define BCM4320_DEFAULT_TXPOWER_DBM_100   13

Definition at line 104 of file rndis_wlan.c.

#define BCM4320_DEFAULT_TXPOWER_DBM_25   7

Definition at line 107 of file rndis_wlan.c.

#define BCM4320_DEFAULT_TXPOWER_DBM_50   10

Definition at line 106 of file rndis_wlan.c.

#define BCM4320_DEFAULT_TXPOWER_DBM_75   12

Definition at line 105 of file rndis_wlan.c.

#define CAP_MODE_80211A   1

Definition at line 356 of file rndis_wlan.c.

#define CAP_MODE_80211B   2

Definition at line 357 of file rndis_wlan.c.

#define CAP_MODE_80211G   4

Definition at line 358 of file rndis_wlan.c.

#define CAP_MODE_MASK   7

Definition at line 359 of file rndis_wlan.c.

#define COMMAND_BUFFER_SIZE   (CONTROL_BUFFER_SIZE + sizeof(struct rndis_set))

Definition at line 375 of file rndis_wlan.c.

#define DEVICE_POLLER_JIFFIES   (HZ)

Definition at line 3186 of file rndis_wlan.c.

#define NDIS_802_11_LENGTH_RATES   8

Definition at line 119 of file rndis_wlan.c.

#define NDIS_802_11_LENGTH_RATES_EX   16

Definition at line 120 of file rndis_wlan.c.

#define NDIS_802_11_LENGTH_SSID   32

Definition at line 118 of file rndis_wlan.c.

#define RNDIS_BCM4320A   1

Definition at line 111 of file rndis_wlan.c.

#define RNDIS_BCM4320B   2

Definition at line 112 of file rndis_wlan.c.

#define RNDIS_MASTER_INTERFACE
Value:
.bInterfaceClass = USB_CLASS_COMM, \
.bInterfaceSubClass = 2 /* ACM */, \
.bInterfaceProtocol = 0x0ff
#define RNDIS_UNKNOWN   0

Definition at line 110 of file rndis_wlan.c.

#define RNDIS_WLAN_ALG_CCMP   (1<<2)

Definition at line 368 of file rndis_wlan.c.

#define RNDIS_WLAN_ALG_NONE   0

Definition at line 365 of file rndis_wlan.c.

#define RNDIS_WLAN_ALG_TKIP   (1<<1)

Definition at line 367 of file rndis_wlan.c.

#define RNDIS_WLAN_ALG_WEP   (1<<0)

Definition at line 366 of file rndis_wlan.c.

#define RNDIS_WLAN_KEY_MGMT_802_1X   (1<<0)

Definition at line 372 of file rndis_wlan.c.

#define RNDIS_WLAN_KEY_MGMT_NONE   0

Definition at line 371 of file rndis_wlan.c.

#define RNDIS_WLAN_KEY_MGMT_PSK   (1<<1)

Definition at line 373 of file rndis_wlan.c.

#define RNDIS_WLAN_NUM_KEYS   4

Definition at line 370 of file rndis_wlan.c.

#define SCAN_DELAY_JIFFIES   (6 * HZ)

Definition at line 1945 of file rndis_wlan.c.

#define WL_NOISE   -96 /* typical noise level in dBm */

Definition at line 92 of file rndis_wlan.c.

#define WL_SIGMAX   -32 /* typical maximum signal level in dBm */

Definition at line 93 of file rndis_wlan.c.

#define WORK_LINK_DOWN   (1<<1)

Definition at line 362 of file rndis_wlan.c.

#define WORK_LINK_UP   (1<<0)

Definition at line 361 of file rndis_wlan.c.

#define WORK_SET_MULTICAST_LIST   (1<<2)

Definition at line 363 of file rndis_wlan.c.

Enumeration Type Documentation

Enumerator:
NDIS_80211_ADDKEY_8021X_AUTH 
NDIS_80211_ADDKEY_SET_INIT_RECV_SEQ 
NDIS_80211_ADDKEY_PAIRWISE_KEY 
NDIS_80211_ADDKEY_TRANSMIT_KEY 

Definition at line 180 of file rndis_wlan.c.

Enumerator:
NDIS_80211_ADDWEP_PERCLIENT_KEY 
NDIS_80211_ADDWEP_TRANSMIT_KEY 

Definition at line 187 of file rndis_wlan.c.

Enumerator:
NDIS_80211_AUTH_OPEN 
NDIS_80211_AUTH_SHARED 
NDIS_80211_AUTH_AUTO_SWITCH 
NDIS_80211_AUTH_WPA 
NDIS_80211_AUTH_WPA_PSK 
NDIS_80211_AUTH_WPA_NONE 
NDIS_80211_AUTH_WPA2 
NDIS_80211_AUTH_WPA2_PSK 

Definition at line 135 of file rndis_wlan.c.

Enumerator:
NDIS_80211_ENCR_WEP_ENABLED 
NDIS_80211_ENCR_DISABLED 
NDIS_80211_ENCR_WEP_KEY_ABSENT 
NDIS_80211_ENCR_NOT_SUPPORTED 
NDIS_80211_ENCR_TKIP_ENABLED 
NDIS_80211_ENCR_TKIP_KEY_ABSENT 
NDIS_80211_ENCR_CCMP_ENABLED 
NDIS_80211_ENCR_CCMP_KEY_ABSENT 

Definition at line 146 of file rndis_wlan.c.

Enumerator:
NDIS_80211_MEDIA_STREAM_OFF 
NDIS_80211_MEDIA_STREAM_ON 

Definition at line 169 of file rndis_wlan.c.

Enumerator:
NDIS_80211_INFRA_ADHOC 
NDIS_80211_INFRA_INFRA 
NDIS_80211_INFRA_AUTO_UNKNOWN 

Definition at line 129 of file rndis_wlan.c.

Enumerator:
NDIS_80211_TYPE_FREQ_HOP 
NDIS_80211_TYPE_DIRECT_SEQ 
NDIS_80211_TYPE_OFDM_A 
NDIS_80211_TYPE_OFDM_G 

Definition at line 122 of file rndis_wlan.c.

Enumerator:
NDIS_80211_PMKID_CAND_PREAUTH 

Definition at line 198 of file rndis_wlan.c.

Enumerator:
NDIS_80211_POWER_MODE_CAM 
NDIS_80211_POWER_MODE_MAX_PSP 
NDIS_80211_POWER_MODE_FAST_PSP 

Definition at line 192 of file rndis_wlan.c.

Enumerator:
NDIS_80211_PRIV_ACCEPT_ALL 
NDIS_80211_PRIV_8021X_WEP 

Definition at line 157 of file rndis_wlan.c.

Enumerator:
NDIS_80211_RADIO_STATUS_ON 
NDIS_80211_RADIO_STATUS_HARDWARE_OFF 
NDIS_80211_RADIO_STATUS_SOFTWARE_OFF 

Definition at line 174 of file rndis_wlan.c.

Enumerator:
NDIS_80211_STATUSTYPE_AUTHENTICATION 
NDIS_80211_STATUSTYPE_MEDIASTREAMMODE 
NDIS_80211_STATUSTYPE_PMKID_CANDIDATELIST 
NDIS_80211_STATUSTYPE_RADIOSTATE 

Definition at line 162 of file rndis_wlan.c.

Function Documentation

MODULE_AUTHOR ( "Bjorge Dijkstra"  )
MODULE_AUTHOR ( "Jussi Kivilinna"  )
MODULE_DESCRIPTION ( "Driver for RNDIS based USB Wireless adapters"  )
MODULE_DEVICE_TABLE ( usb  ,
products   
)
MODULE_LICENSE ( "GPL"  )
module_param_named ( frameburst  ,
modparam_frameburst  ,
int  ,
0444   
)
module_param_named ( afterburner  ,
modparam_afterburner  ,
int  ,
0444   
)
module_param_named ( power_save  ,
modparam_power_save  ,
int  ,
0444   
)
module_param_named ( power_output  ,
modparam_power_output  ,
int  ,
0444   
)
module_param_named ( roamtrigger  ,
modparam_roamtrigger  ,
int  ,
0444   
)
module_param_named ( roamdelta  ,
modparam_roamdelta  ,
int  ,
0444   
)
module_param_named ( workaround_interval  ,
modparam_workaround_interval  ,
int  ,
0444   
)
module_param_string ( country  ,
modparam_country  ,
,
0444   
)
MODULE_PARM_DESC ( country  ,
"Country code   ISO 3166-1 alpha-2,
default:EU"   
)
MODULE_PARM_DESC ( frameburst  ,
"enable frame bursting (default: on)"   
)
MODULE_PARM_DESC ( afterburner  ,
"enable afterburner aka '125 High Speed Mode' (default: off)"   
)
MODULE_PARM_DESC ( power_save  ,
"set power save mode:  0 = off,
= on 
)
MODULE_PARM_DESC ( power_output  ,
"set power output:  0 = 25%,
= 50%,
= 75% 
)
MODULE_PARM_DESC ( roamtrigger  ,
"set roaming dBm trigger: -  80 = optimize for distance 
)
MODULE_PARM_DESC ( roamdelta  ,
"set roaming tendency:  0 = aggressive,
= moderate 
)
MODULE_PARM_DESC ( workaround_interval  ,
"set stall workaround interval in msecs (0=disabled) (default: 0)"   
)
module_usb_driver ( rndis_wlan_driver  )

Variable Documentation