Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions
sme.c File Reference
#include <linux/etherdevice.h>
#include <linux/if_arp.h>
#include <linux/slab.h>
#include <linux/workqueue.h>
#include <linux/wireless.h>
#include <linux/export.h>
#include <net/iw_handler.h>
#include <net/cfg80211.h>
#include <net/rtnetlink.h>
#include "nl80211.h"
#include "reg.h"

Go to the source code of this file.

Data Structures

struct  cfg80211_conn
 

Functions

void cfg80211_conn_work (struct work_struct *work)
 
void cfg80211_sme_scan_done (struct net_device *dev)
 
void cfg80211_sme_rx_auth (struct net_device *dev, const u8 *buf, size_t len)
 
bool cfg80211_sme_failed_reassoc (struct wireless_dev *wdev)
 
void cfg80211_sme_failed_assoc (struct wireless_dev *wdev)
 
void __cfg80211_connect_result (struct net_device *dev, const u8 *bssid, const u8 *req_ie, size_t req_ie_len, const u8 *resp_ie, size_t resp_ie_len, u16 status, bool wextev, struct cfg80211_bss *bss)
 
void cfg80211_connect_result (struct net_device *dev, const u8 *bssid, const u8 *req_ie, size_t req_ie_len, const u8 *resp_ie, size_t resp_ie_len, u16 status, gfp_t gfp)
 
 EXPORT_SYMBOL (cfg80211_connect_result)
 
void __cfg80211_roamed (struct wireless_dev *wdev, struct cfg80211_bss *bss, const u8 *req_ie, size_t req_ie_len, const u8 *resp_ie, size_t resp_ie_len)
 
void cfg80211_roamed (struct net_device *dev, struct ieee80211_channel *channel, const u8 *bssid, const u8 *req_ie, size_t req_ie_len, const u8 *resp_ie, size_t resp_ie_len, gfp_t gfp)
 
 EXPORT_SYMBOL (cfg80211_roamed)
 
void cfg80211_roamed_bss (struct net_device *dev, struct cfg80211_bss *bss, const u8 *req_ie, size_t req_ie_len, const u8 *resp_ie, size_t resp_ie_len, gfp_t gfp)
 
 EXPORT_SYMBOL (cfg80211_roamed_bss)
 
void __cfg80211_disconnected (struct net_device *dev, const u8 *ie, size_t ie_len, u16 reason, bool from_ap)
 
void cfg80211_disconnected (struct net_device *dev, u16 reason, u8 *ie, size_t ie_len, gfp_t gfp)
 
 EXPORT_SYMBOL (cfg80211_disconnected)
 
int __cfg80211_connect (struct cfg80211_registered_device *rdev, struct net_device *dev, struct cfg80211_connect_params *connect, struct cfg80211_cached_keys *connkeys, const u8 *prev_bssid)
 
int cfg80211_connect (struct cfg80211_registered_device *rdev, struct net_device *dev, struct cfg80211_connect_params *connect, struct cfg80211_cached_keys *connkeys)
 
int __cfg80211_disconnect (struct cfg80211_registered_device *rdev, struct net_device *dev, u16 reason, bool wextev)
 
int cfg80211_disconnect (struct cfg80211_registered_device *rdev, struct net_device *dev, u16 reason, bool wextev)
 
void cfg80211_sme_disassoc (struct net_device *dev, struct cfg80211_internal_bss *bss)
 

Function Documentation

int __cfg80211_connect ( struct cfg80211_registered_device rdev,
struct net_device dev,
struct cfg80211_connect_params connect,
struct cfg80211_cached_keys connkeys,
const u8 prev_bssid 
)

Definition at line 758 of file sme.c.

void __cfg80211_connect_result ( struct net_device dev,
const u8 bssid,
const u8 req_ie,
size_t  req_ie_len,
const u8 resp_ie,
size_t  resp_ie_len,
u16  status,
bool  wextev,
struct cfg80211_bss bss 
)

Definition at line 411 of file sme.c.

int __cfg80211_disconnect ( struct cfg80211_registered_device rdev,
struct net_device dev,
u16  reason,
bool  wextev 
)

Definition at line 925 of file sme.c.

void __cfg80211_disconnected ( struct net_device dev,
const u8 ie,
size_t  ie_len,
u16  reason,
bool  from_ap 
)

Definition at line 676 of file sme.c.

void __cfg80211_roamed ( struct wireless_dev wdev,
struct cfg80211_bss bss,
const u8 req_ie,
size_t  req_ie_len,
const u8 resp_ie,
size_t  resp_ie_len 
)

Definition at line 556 of file sme.c.

void cfg80211_conn_work ( struct work_struct work)

Definition at line 213 of file sme.c.

int cfg80211_connect ( struct cfg80211_registered_device rdev,
struct net_device dev,
struct cfg80211_connect_params connect,
struct cfg80211_cached_keys connkeys 
)

Definition at line 909 of file sme.c.

void cfg80211_connect_result ( struct net_device dev,
const u8 bssid,
const u8 req_ie,
size_t  req_ie_len,
const u8 resp_ie,
size_t  resp_ie_len,
u16  status,
gfp_t  gfp 
)

cfg80211_connect_result - notify cfg80211 of connection result

: network device : the BSSID of the AP : association request IEs (maybe be NULL) : association request IEs length : association response IEs (may be NULL) : assoc response IEs length : status code, 0 for successful connection, use WLAN_STATUS_UNSPECIFIED_FAILURE if your device cannot give you the real status code for failures. : allocation flags

It should be called by the underlying driver whenever connect() has succeeded.

Definition at line 518 of file sme.c.

int cfg80211_disconnect ( struct cfg80211_registered_device rdev,
struct net_device dev,
u16  reason,
bool  wextev 
)

Definition at line 982 of file sme.c.

void cfg80211_disconnected ( struct net_device dev,
u16  reason,
u8 ie,
size_t  ie_len,
gfp_t  gfp 
)

cfg80211_disconnected - notify cfg80211 that connection was dropped

: network device : information elements of the deauth/disassoc frame (may be NULL) : length of IEs : reason code for the disconnection, set it to 0 if unknown : allocation flags

After it calls this function, the driver should enter an idle state and not try to connect to any AP any more.

Definition at line 731 of file sme.c.

void cfg80211_roamed ( struct net_device dev,
struct ieee80211_channel channel,
const u8 bssid,
const u8 req_ie,
size_t  req_ie_len,
const u8 resp_ie,
size_t  resp_ie_len,
gfp_t  gfp 
)

cfg80211_roamed - notify cfg80211 of roaming

: network device : the channel of the new AP : the BSSID of the new AP : association request IEs (maybe be NULL) : association request IEs length : association response IEs (may be NULL) : assoc response IEs length : allocation flags

It should be called by the underlying driver whenever it roamed from one AP to another while connected.

Definition at line 617 of file sme.c.

void cfg80211_roamed_bss ( struct net_device dev,
struct cfg80211_bss bss,
const u8 req_ie,
size_t  req_ie_len,
const u8 resp_ie,
size_t  resp_ie_len,
gfp_t  gfp 
)

cfg80211_roamed_bss - notify cfg80211 of roaming

: network device : entry of bss to which STA got roamed : association request IEs (maybe be NULL) : association request IEs length : association response IEs (may be NULL) : assoc response IEs length : allocation flags

This is just a wrapper to notify cfg80211 of roaming event with driver passing bss to avoid a race in timeout of the bss entry. It should be called by the underlying driver whenever it roamed from one AP to another while connected. Drivers which have roaming implemented in firmware may use this function to avoid a race in bss entry timeout where the bss entry of the new AP is seen in the driver, but gets timed out by the time it is accessed in __cfg80211_roamed() due to delay in scheduling rdev->event_work. In case of any failures, the reference is released either in cfg80211_roamed_bss() or in __cfg80211_romed(), Otherwise, it will be released while diconneting from the current bss.

Definition at line 639 of file sme.c.

void cfg80211_sme_disassoc ( struct net_device dev,
struct cfg80211_internal_bss bss 
)

Definition at line 995 of file sme.c.

void cfg80211_sme_failed_assoc ( struct wireless_dev wdev)

Definition at line 402 of file sme.c.

bool cfg80211_sme_failed_reassoc ( struct wireless_dev wdev)

Definition at line 380 of file sme.c.

void cfg80211_sme_rx_auth ( struct net_device dev,
const u8 buf,
size_t  len 
)

Definition at line 327 of file sme.c.

void cfg80211_sme_scan_done ( struct net_device dev)

Definition at line 316 of file sme.c.

EXPORT_SYMBOL ( cfg80211_connect_result  )
EXPORT_SYMBOL ( cfg80211_roamed  )
EXPORT_SYMBOL ( cfg80211_roamed_bss  )
EXPORT_SYMBOL ( cfg80211_disconnected  )