Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
wl_cfg80211.c File Reference
#include <linux/kernel.h>
#include <linux/if_arp.h>
#include <linux/sched.h>
#include <linux/kthread.h>
#include <linux/netdevice.h>
#include <linux/bitops.h>
#include <linux/etherdevice.h>
#include <linux/ieee80211.h>
#include <linux/uaccess.h>
#include <net/cfg80211.h>
#include <net/netlink.h>
#include <brcmu_utils.h>
#include <defs.h>
#include <brcmu_wifi.h>
#include "dhd.h"
#include "wl_cfg80211.h"

Go to the source code of this file.

Data Structures

struct  brcmf_tlv
 
struct  brcmf_vs_tlv
 
struct  parsed_vndr_ie_info
 
struct  parsed_vndr_ies
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define BRCMF_SCAN_IE_LEN_MAX   2048
 
#define BRCMF_PNO_VERSION   2
 
#define BRCMF_PNO_TIME   30
 
#define BRCMF_PNO_REPEAT   4
 
#define BRCMF_PNO_FREQ_EXPO_MAX   3
 
#define BRCMF_PNO_MAX_PFN_COUNT   16
 
#define BRCMF_PNO_ENABLE_ADAPTSCAN_BIT   6
 
#define BRCMF_PNO_HIDDEN_BIT   2
 
#define BRCMF_PNO_WPA_AUTH_ANY   0xFFFFFFFF
 
#define BRCMF_PNO_SCAN_COMPLETE   1
 
#define BRCMF_PNO_SCAN_INCOMPLETE   0
 
#define TLV_LEN_OFF   1 /* length offset */
 
#define TLV_HDR_LEN   2 /* header length */
 
#define TLV_BODY_OFF   2 /* body offset */
 
#define TLV_OUI_LEN   3 /* oui id length */
 
#define WPA_OUI   "\x00\x50\xF2" /* WPA OUI */
 
#define WPA_OUI_TYPE   1
 
#define RSN_OUI   "\x00\x0F\xAC" /* RSN OUI */
 
#define WME_OUI_TYPE   2
 
#define VS_IE_FIXED_HDR_LEN   6
 
#define WPA_IE_VERSION_LEN   2
 
#define WPA_IE_MIN_OUI_LEN   4
 
#define WPA_IE_SUITE_COUNT_LEN   2
 
#define WPA_CIPHER_NONE   0 /* None */
 
#define WPA_CIPHER_WEP_40   1 /* WEP (40-bit) */
 
#define WPA_CIPHER_TKIP   2 /* TKIP: default for WPA */
 
#define WPA_CIPHER_AES_CCM   4 /* AES (CCM) */
 
#define WPA_CIPHER_WEP_104   5 /* WEP (104-bit) */
 
#define RSN_AKM_NONE   0 /* None (IBSS) */
 
#define RSN_AKM_UNSPECIFIED   1 /* Over 802.1x */
 
#define RSN_AKM_PSK   2 /* Pre-shared Key */
 
#define RSN_CAP_LEN   2 /* Length of RSN capabilities */
 
#define RSN_CAP_PTK_REPLAY_CNTR_MASK   0x000C
 
#define VNDR_IE_CMD_LEN
 
#define VNDR_IE_COUNT_OFFSET   4
 
#define VNDR_IE_PKTFLAG_OFFSET   8
 
#define VNDR_IE_VSIE_OFFSET   12
 
#define VNDR_IE_HDR_SIZE   12
 
#define VNDR_IE_BEACON_FLAG   0x1
 
#define VNDR_IE_PRBRSP_FLAG   0x2
 
#define MAX_VNDR_IE_NUMBER   5
 
#define DOT11_MGMT_HDR_LEN   24 /* d11 management header len */
 
#define DOT11_BCN_PRB_FIXED_LEN   12 /* beacon/probe fixed length */
 
#define BRCMF_ASSOC_PARAMS_FIXED_SIZE   (sizeof(struct brcmf_assoc_params_le) - sizeof(u16))
 
#define CHAN2G(_channel, _freq, _flags)
 
#define CHAN5G(_channel, _flags)
 
#define RATE_TO_BASE100KBPS(rate)   (((rate) * 10) / 2)
 
#define RATETAB_ENT(_rateid, _flags)
 
#define wl_a_rates   (__wl_rates + 4)
 
#define wl_a_rates_size   8
 
#define wl_g_rates   (__wl_rates + 0)
 
#define wl_g_rates_size   12
 
#define QDBM_OFFSET   153 /* Offset for first entry */
 
#define QDBM_TABLE_LEN   40 /* Table size */
 
#define QDBM_TABLE_LOW_BOUND   6493 /* Low bound */
 
#define QDBM_TABLE_HIGH_BOUND   64938 /* High bound */
 

Functions

struct brcmf_vs_tlvbrcmf_find_wpaie (u8 *parse, u32 len)
 
s32 brcmf_set_management_ie (struct brcmf_cfg80211_info *cfg, struct net_device *ndev, s32 bssidx, s32 pktflag, u8 *vndr_ie_buf, u32 vndr_ie_len)
 
struct brcmf_cfg80211_infobrcmf_cfg80211_attach (struct net_device *ndev, struct device *busdev, struct brcmf_pub *drvr)
 
void brcmf_cfg80211_detach (struct brcmf_cfg80211_info *cfg)
 
void brcmf_cfg80211_event (struct net_device *ndev, const struct brcmf_event_msg *e, void *data)
 
s32 brcmf_cfg80211_up (struct brcmf_cfg80211_info *cfg)
 
s32 brcmf_cfg80211_down (struct brcmf_cfg80211_info *cfg)
 

Macro Definition Documentation

#define BRCMF_ASSOC_PARAMS_FIXED_SIZE   (sizeof(struct brcmf_assoc_params_le) - sizeof(u16))

Definition at line 89 of file wl_cfg80211.c.

#define BRCMF_PNO_ENABLE_ADAPTSCAN_BIT   6

Definition at line 45 of file wl_cfg80211.c.

#define BRCMF_PNO_FREQ_EXPO_MAX   3

Definition at line 43 of file wl_cfg80211.c.

#define BRCMF_PNO_HIDDEN_BIT   2

Definition at line 46 of file wl_cfg80211.c.

#define BRCMF_PNO_MAX_PFN_COUNT   16

Definition at line 44 of file wl_cfg80211.c.

#define BRCMF_PNO_REPEAT   4

Definition at line 42 of file wl_cfg80211.c.

#define BRCMF_PNO_SCAN_COMPLETE   1

Definition at line 48 of file wl_cfg80211.c.

#define BRCMF_PNO_SCAN_INCOMPLETE   0

Definition at line 49 of file wl_cfg80211.c.

#define BRCMF_PNO_TIME   30

Definition at line 41 of file wl_cfg80211.c.

#define BRCMF_PNO_VERSION   2

Definition at line 40 of file wl_cfg80211.c.

#define BRCMF_PNO_WPA_AUTH_ANY   0xFFFFFFFF

Definition at line 47 of file wl_cfg80211.c.

#define BRCMF_SCAN_IE_LEN_MAX   2048

Definition at line 39 of file wl_cfg80211.c.

#define CHAN2G (   _channel,
  _freq,
  _flags 
)
Value:
{ \
.center_freq = (_freq), \
.hw_value = (_channel), \
.flags = (_flags), \
.max_antenna_gain = 0, \
.max_power = 30, \
}

Definition at line 107 of file wl_cfg80211.c.

#define CHAN5G (   _channel,
  _flags 
)
Value:
{ \
.center_freq = 5000 + (5 * (_channel)), \
.hw_value = (_channel), \
.flags = (_flags), \
.max_antenna_gain = 0, \
.max_power = 30, \
}

Definition at line 116 of file wl_cfg80211.c.

#define DOT11_BCN_PRB_FIXED_LEN   12 /* beacon/probe fixed length */

Definition at line 87 of file wl_cfg80211.c.

#define DOT11_MGMT_HDR_LEN   24 /* d11 management header len */

Definition at line 86 of file wl_cfg80211.c.

#define MAX_VNDR_IE_NUMBER   5

Definition at line 84 of file wl_cfg80211.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 19 of file wl_cfg80211.c.

#define QDBM_OFFSET   153 /* Offset for first entry */

Definition at line 314 of file wl_cfg80211.c.

#define QDBM_TABLE_HIGH_BOUND   64938 /* High bound */

Definition at line 327 of file wl_cfg80211.c.

#define QDBM_TABLE_LEN   40 /* Table size */

Definition at line 315 of file wl_cfg80211.c.

#define QDBM_TABLE_LOW_BOUND   6493 /* Low bound */

Definition at line 320 of file wl_cfg80211.c.

#define RATE_TO_BASE100KBPS (   rate)    (((rate) * 10) / 2)

Definition at line 125 of file wl_cfg80211.c.

#define RATETAB_ENT (   _rateid,
  _flags 
)
Value:
{ \
.bitrate = RATE_TO_BASE100KBPS(_rateid), \
.hw_value = (_rateid), \
.flags = (_flags), \
}

Definition at line 126 of file wl_cfg80211.c.

#define RSN_AKM_NONE   0 /* None (IBSS) */

Definition at line 71 of file wl_cfg80211.c.

#define RSN_AKM_PSK   2 /* Pre-shared Key */

Definition at line 73 of file wl_cfg80211.c.

#define RSN_AKM_UNSPECIFIED   1 /* Over 802.1x */

Definition at line 72 of file wl_cfg80211.c.

#define RSN_CAP_LEN   2 /* Length of RSN capabilities */

Definition at line 74 of file wl_cfg80211.c.

#define RSN_CAP_PTK_REPLAY_CNTR_MASK   0x000C

Definition at line 75 of file wl_cfg80211.c.

#define RSN_OUI   "\x00\x0F\xAC" /* RSN OUI */

Definition at line 57 of file wl_cfg80211.c.

#define TLV_BODY_OFF   2 /* body offset */

Definition at line 53 of file wl_cfg80211.c.

#define TLV_HDR_LEN   2 /* header length */

Definition at line 52 of file wl_cfg80211.c.

#define TLV_LEN_OFF   1 /* length offset */

Definition at line 51 of file wl_cfg80211.c.

#define TLV_OUI_LEN   3 /* oui id length */

Definition at line 54 of file wl_cfg80211.c.

#define VNDR_IE_BEACON_FLAG   0x1

Definition at line 82 of file wl_cfg80211.c.

#define VNDR_IE_CMD_LEN
Value:
4 /* length of the set command
* string :"add", "del" (+ NUL)
*/

Definition at line 77 of file wl_cfg80211.c.

#define VNDR_IE_COUNT_OFFSET   4

Definition at line 78 of file wl_cfg80211.c.

#define VNDR_IE_HDR_SIZE   12

Definition at line 81 of file wl_cfg80211.c.

#define VNDR_IE_PKTFLAG_OFFSET   8

Definition at line 79 of file wl_cfg80211.c.

#define VNDR_IE_PRBRSP_FLAG   0x2

Definition at line 83 of file wl_cfg80211.c.

#define VNDR_IE_VSIE_OFFSET   12

Definition at line 80 of file wl_cfg80211.c.

#define VS_IE_FIXED_HDR_LEN   6

Definition at line 60 of file wl_cfg80211.c.

#define wl_a_rates   (__wl_rates + 4)

Definition at line 148 of file wl_cfg80211.c.

#define wl_a_rates_size   8

Definition at line 149 of file wl_cfg80211.c.

#define wl_g_rates   (__wl_rates + 0)

Definition at line 150 of file wl_cfg80211.c.

#define wl_g_rates_size   12

Definition at line 151 of file wl_cfg80211.c.

#define WME_OUI_TYPE   2

Definition at line 58 of file wl_cfg80211.c.

#define WPA_CIPHER_AES_CCM   4 /* AES (CCM) */

Definition at line 68 of file wl_cfg80211.c.

#define WPA_CIPHER_NONE   0 /* None */

Definition at line 65 of file wl_cfg80211.c.

#define WPA_CIPHER_TKIP   2 /* TKIP: default for WPA */

Definition at line 67 of file wl_cfg80211.c.

#define WPA_CIPHER_WEP_104   5 /* WEP (104-bit) */

Definition at line 69 of file wl_cfg80211.c.

#define WPA_CIPHER_WEP_40   1 /* WEP (40-bit) */

Definition at line 66 of file wl_cfg80211.c.

#define WPA_IE_MIN_OUI_LEN   4

Definition at line 62 of file wl_cfg80211.c.

#define WPA_IE_SUITE_COUNT_LEN   2

Definition at line 63 of file wl_cfg80211.c.

#define WPA_IE_VERSION_LEN   2

Definition at line 61 of file wl_cfg80211.c.

#define WPA_OUI   "\x00\x50\xF2" /* WPA OUI */

Definition at line 55 of file wl_cfg80211.c.

#define WPA_OUI_TYPE   1

Definition at line 56 of file wl_cfg80211.c.

Function Documentation

struct brcmf_cfg80211_info* brcmf_cfg80211_attach ( struct net_device ndev,
struct device busdev,
struct brcmf_pub drvr 
)
read

Definition at line 5146 of file wl_cfg80211.c.

void brcmf_cfg80211_detach ( struct brcmf_cfg80211_info cfg)

Definition at line 5184 of file wl_cfg80211.c.

s32 brcmf_cfg80211_down ( struct brcmf_cfg80211_info cfg)

Definition at line 5526 of file wl_cfg80211.c.

void brcmf_cfg80211_event ( struct net_device ndev,
const struct brcmf_event_msg e,
void data 
)

Definition at line 5191 of file wl_cfg80211.c.

s32 brcmf_cfg80211_up ( struct brcmf_cfg80211_info cfg)

Definition at line 5515 of file wl_cfg80211.c.

struct brcmf_vs_tlv* brcmf_find_wpaie ( u8 parse,
u32  len 
)
read

Definition at line 2676 of file wl_cfg80211.c.

s32 brcmf_set_management_ie ( struct brcmf_cfg80211_info cfg,
struct net_device ndev,
s32  bssidx,
s32  pktflag,
u8 vndr_ie_buf,
u32  vndr_ie_len 
)

Definition at line 3965 of file wl_cfg80211.c.