Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions
mlme.c File Reference
#include <linux/delay.h>
#include <linux/if_ether.h>
#include <linux/skbuff.h>
#include <linux/if_arp.h>
#include <linux/etherdevice.h>
#include <linux/moduleparam.h>
#include <linux/rtnetlink.h>
#include <linux/pm_qos.h>
#include <linux/crc32.h>
#include <linux/slab.h>
#include <linux/export.h>
#include <net/mac80211.h>
#include <asm/unaligned.h>
#include "ieee80211_i.h"
#include "driver-ops.h"
#include "rate.h"
#include "led.h"

Go to the source code of this file.

Macros

#define IEEE80211_AUTH_TIMEOUT   (HZ / 5)
 
#define IEEE80211_AUTH_MAX_TRIES   3
 
#define IEEE80211_AUTH_WAIT_ASSOC   (HZ * 5)
 
#define IEEE80211_ASSOC_TIMEOUT   (HZ / 5)
 
#define IEEE80211_ASSOC_MAX_TRIES   3
 
#define IEEE80211_BEACON_LOSS_COUNT   7
 
#define IEEE80211_CONNECTION_IDLE_TIME   (30 * HZ)
 
#define IEEE80211_SIGNAL_AVE_WEIGHT   3
 
#define IEEE80211_SIGNAL_AVE_MIN_COUNT   4
 
#define TMR_RUNNING_TIMER   0
 
#define TMR_RUNNING_CHANSW   1
 

Enumerations

enum  rx_mgmt_action {
  RX_MGMT_NONE, RX_MGMT_CFG80211_DEAUTH, RX_MGMT_CFG80211_DISASSOC, RX_MGMT_CFG80211_RX_AUTH,
  RX_MGMT_CFG80211_RX_ASSOC, RX_MGMT_CFG80211_ASSOC_TIMEOUT
}
 

Functions

 module_param (max_nullfunc_tries, int, 0644)
 
 MODULE_PARM_DESC (max_nullfunc_tries,"Maximum nullfunc tx tries before disconnecting (reason 4).")
 
 module_param (max_probe_tries, int, 0644)
 
 MODULE_PARM_DESC (max_probe_tries,"Maximum probe tries before disconnecting (reason 4).")
 
 module_param (probe_wait_ms, int, 0644)
 
 MODULE_PARM_DESC (probe_wait_ms,"Maximum time(ms) to wait for probe response"" before disconnecting (reason 4).")
 
void ieee80211_sta_reset_beacon_monitor (struct ieee80211_sub_if_data *sdata)
 
void ieee80211_sta_reset_conn_monitor (struct ieee80211_sub_if_data *sdata)
 
void ieee80211_send_pspoll (struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata)
 
void ieee80211_send_nullfunc (struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata, int powersave)
 
void ieee80211_chswitch_done (struct ieee80211_vif *vif, bool success)
 
 EXPORT_SYMBOL (ieee80211_chswitch_done)
 
void ieee80211_sta_process_chanswitch (struct ieee80211_sub_if_data *sdata, struct ieee80211_channel_sw_ie *sw_elem, struct ieee80211_bss *bss, u64 timestamp)
 
void ieee80211_enable_dyn_ps (struct ieee80211_vif *vif)
 
 EXPORT_SYMBOL (ieee80211_enable_dyn_ps)
 
void ieee80211_disable_dyn_ps (struct ieee80211_vif *vif)
 
 EXPORT_SYMBOL (ieee80211_disable_dyn_ps)
 
void ieee80211_recalc_ps (struct ieee80211_local *local, s32 latency)
 
void ieee80211_recalc_ps_vif (struct ieee80211_sub_if_data *sdata)
 
void ieee80211_dynamic_ps_disable_work (struct work_struct *work)
 
void ieee80211_dynamic_ps_enable_work (struct work_struct *work)
 
void ieee80211_dynamic_ps_timer (unsigned long data)
 
void ieee80211_sta_rx_notify (struct ieee80211_sub_if_data *sdata, struct ieee80211_hdr *hdr)
 
void ieee80211_sta_tx_notify (struct ieee80211_sub_if_data *sdata, struct ieee80211_hdr *hdr, bool ack)
 
struct sk_buffieee80211_ap_probereq_get (struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 
 EXPORT_SYMBOL (ieee80211_ap_probereq_get)
 
void ieee80211_beacon_loss (struct ieee80211_vif *vif)
 
 EXPORT_SYMBOL (ieee80211_beacon_loss)
 
void ieee80211_connection_loss (struct ieee80211_vif *vif)
 
 EXPORT_SYMBOL (ieee80211_connection_loss)
 
void ieee80211_sta_rx_queued_mgmt (struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
 
void ieee80211_sta_work (struct ieee80211_sub_if_data *sdata)
 
void ieee80211_sta_setup_sdata (struct ieee80211_sub_if_data *sdata)
 
void ieee80211_mlme_notify_scan_completed (struct ieee80211_local *local)
 
int ieee80211_max_network_latency (struct notifier_block *nb, unsigned long data, void *dummy)
 
int ieee80211_mgd_auth (struct ieee80211_sub_if_data *sdata, struct cfg80211_auth_request *req)
 
int ieee80211_mgd_assoc (struct ieee80211_sub_if_data *sdata, struct cfg80211_assoc_request *req)
 
int ieee80211_mgd_deauth (struct ieee80211_sub_if_data *sdata, struct cfg80211_deauth_request *req)
 
int ieee80211_mgd_disassoc (struct ieee80211_sub_if_data *sdata, struct cfg80211_disassoc_request *req)
 
void ieee80211_mgd_stop (struct ieee80211_sub_if_data *sdata)
 
void ieee80211_cqm_rssi_notify (struct ieee80211_vif *vif, enum nl80211_cqm_rssi_threshold_event rssi_event, gfp_t gfp)
 
 EXPORT_SYMBOL (ieee80211_cqm_rssi_notify)
 

Macro Definition Documentation

#define IEEE80211_ASSOC_MAX_TRIES   3

Definition at line 37 of file mlme.c.

#define IEEE80211_ASSOC_TIMEOUT   (HZ / 5)

Definition at line 36 of file mlme.c.

#define IEEE80211_AUTH_MAX_TRIES   3

Definition at line 34 of file mlme.c.

#define IEEE80211_AUTH_TIMEOUT   (HZ / 5)

Definition at line 33 of file mlme.c.

#define IEEE80211_AUTH_WAIT_ASSOC   (HZ * 5)

Definition at line 35 of file mlme.c.

#define IEEE80211_BEACON_LOSS_COUNT   7

Definition at line 57 of file mlme.c.

#define IEEE80211_CONNECTION_IDLE_TIME   (30 * HZ)

Definition at line 63 of file mlme.c.

#define IEEE80211_SIGNAL_AVE_MIN_COUNT   4

Definition at line 86 of file mlme.c.

#define IEEE80211_SIGNAL_AVE_WEIGHT   3

Definition at line 80 of file mlme.c.

#define TMR_RUNNING_CHANSW   1

Definition at line 89 of file mlme.c.

#define TMR_RUNNING_TIMER   0

Definition at line 88 of file mlme.c.

Enumeration Type Documentation

Enumerator:
RX_MGMT_NONE 
RX_MGMT_CFG80211_DEAUTH 
RX_MGMT_CFG80211_DISASSOC 
RX_MGMT_CFG80211_RX_AUTH 
RX_MGMT_CFG80211_RX_ASSOC 
RX_MGMT_CFG80211_ASSOC_TIMEOUT 

Definition at line 97 of file mlme.c.

Function Documentation

EXPORT_SYMBOL ( ieee80211_chswitch_done  )
EXPORT_SYMBOL ( ieee80211_enable_dyn_ps  )
EXPORT_SYMBOL ( ieee80211_disable_dyn_ps  )
EXPORT_SYMBOL ( ieee80211_ap_probereq_get  )
EXPORT_SYMBOL ( ieee80211_beacon_loss  )
EXPORT_SYMBOL ( ieee80211_connection_loss  )
EXPORT_SYMBOL ( ieee80211_cqm_rssi_notify  )
struct sk_buff* ieee80211_ap_probereq_get ( struct ieee80211_hw hw,
struct ieee80211_vif vif 
)
read

ieee80211_ap_probereq_get - retrieve a Probe Request template : pointer obtained from ieee80211_alloc_hw(). : &struct ieee80211_vif pointer from the add_interface callback.

Creates a Probe Request template which can, for example, be uploaded to hardware. The template is filled with bssid, ssid and supported rate information. This function must only be called from within the .bss_info_changed callback function and only in managed mode. The function is only useful when the interface is associated, otherwise it will return NULL.

Definition at line 1664 of file mlme.c.

void ieee80211_beacon_loss ( struct ieee80211_vif vif)

ieee80211_beacon_loss - inform hardware does not receive beacons

: &struct ieee80211_vif pointer from the add_interface callback.

When beacon filtering is enabled with IEEE80211_VIF_BEACON_FILTER and IEEE80211_CONF_PS is set, the driver needs to inform whenever the hardware is not receiving beacons with this function.

Definition at line 1770 of file mlme.c.

void ieee80211_chswitch_done ( struct ieee80211_vif vif,
bool  success 
)

ieee80211_chswitch_done - Complete channel switch process : &struct ieee80211_vif pointer from the add_interface callback. : make the channel switch successful or not

Complete the channel switch post-process: set the new operational channel and wake up the suspended queues.

Definition at line 681 of file mlme.c.

void ieee80211_connection_loss ( struct ieee80211_vif vif)

ieee80211_connection_loss - inform hardware has lost connection to the AP

: &struct ieee80211_vif pointer from the add_interface callback.

When beacon filtering is enabled with IEEE80211_VIF_BEACON_FILTER, and IEEE80211_CONF_PS and IEEE80211_HW_CONNECTION_MONITOR are set, the driver needs to inform if the connection to the AP has been lost.

This function will cause immediate change to disassociated state, without connection recovery attempts.

Definition at line 1782 of file mlme.c.

void ieee80211_cqm_rssi_notify ( struct ieee80211_vif vif,
enum nl80211_cqm_rssi_threshold_event  rssi_event,
gfp_t  gfp 
)

ieee80211_cqm_rssi_notify - inform a configured connection quality monitoring rssi threshold triggered

: &struct ieee80211_vif pointer from the add_interface callback. : the RSSI trigger event type : context flags

When the IEEE80211_VIF_SUPPORTS_CQM_RSSI is set, and a connection quality monitoring is configured with an rssi threshold, the driver will inform whenever the rssi level reaches the threshold.

Definition at line 3653 of file mlme.c.

void ieee80211_disable_dyn_ps ( struct ieee80211_vif vif)

ieee80211_disable_dyn_ps - force mac80211 to temporarily disable dynamic psm

: &struct ieee80211_vif pointer from the add_interface callback.

Some hardware require full power save to manage simultaneous BT traffic on the WLAN frequency. Full PSM is required periodically, whenever there are burst of BT traffic. The hardware gets information of BT traffic via hardware co-existence lines, and consequentially requests mac80211 to (temporarily) enter full psm. This function will only temporarily disable dynamic PS, not enable PSM if it was not already enabled. The driver must make sure to re-enable dynamic PS using ieee80211_enable_dyn_ps() if the driver has disabled it.

Definition at line 864 of file mlme.c.

void ieee80211_dynamic_ps_disable_work ( struct work_struct work)

Definition at line 1051 of file mlme.c.

void ieee80211_dynamic_ps_enable_work ( struct work_struct work)

Definition at line 1066 of file mlme.c.

void ieee80211_dynamic_ps_timer ( unsigned long  data)

Definition at line 1141 of file mlme.c.

void ieee80211_enable_dyn_ps ( struct ieee80211_vif vif)

ieee80211_enable_dyn_ps - restore dynamic psm after being disabled

: &struct ieee80211_vif pointer from the add_interface callback.

This function restores dynamic PS after being temporarily disabled via ieee80211_disable_dyn_ps(). Each ieee80211_disable_dyn_ps() call must be coupled with an eventual call to this function.

Definition at line 849 of file mlme.c.

int ieee80211_max_network_latency ( struct notifier_block nb,
unsigned long  data,
void dummy 
)

Definition at line 3046 of file mlme.c.

int ieee80211_mgd_assoc ( struct ieee80211_sub_if_data sdata,
struct cfg80211_assoc_request req 
)

Definition at line 3347 of file mlme.c.

int ieee80211_mgd_auth ( struct ieee80211_sub_if_data sdata,
struct cfg80211_auth_request req 
)

Definition at line 3250 of file mlme.c.

int ieee80211_mgd_deauth ( struct ieee80211_sub_if_data sdata,
struct cfg80211_deauth_request req 
)

Definition at line 3557 of file mlme.c.

int ieee80211_mgd_disassoc ( struct ieee80211_sub_if_data sdata,
struct cfg80211_disassoc_request req 
)

Definition at line 3600 of file mlme.c.

void ieee80211_mgd_stop ( struct ieee80211_sub_if_data sdata)

Definition at line 3640 of file mlme.c.

void ieee80211_mlme_notify_scan_completed ( struct ieee80211_local local)

Definition at line 3035 of file mlme.c.

void ieee80211_recalc_ps ( struct ieee80211_local local,
s32  latency 
)

Definition at line 955 of file mlme.c.

void ieee80211_recalc_ps_vif ( struct ieee80211_sub_if_data sdata)

Definition at line 1041 of file mlme.c.

void ieee80211_send_nullfunc ( struct ieee80211_local local,
struct ieee80211_sub_if_data sdata,
int  powersave 
)

Definition at line 592 of file mlme.c.

void ieee80211_send_pspoll ( struct ieee80211_local local,
struct ieee80211_sub_if_data sdata 
)

Definition at line 575 of file mlme.c.

void ieee80211_sta_process_chanswitch ( struct ieee80211_sub_if_data sdata,
struct ieee80211_channel_sw_ie sw_elem,
struct ieee80211_bss bss,
u64  timestamp 
)

Definition at line 715 of file mlme.c.

void ieee80211_sta_reset_beacon_monitor ( struct ieee80211_sub_if_data sdata)

Definition at line 142 of file mlme.c.

void ieee80211_sta_reset_conn_monitor ( struct ieee80211_sub_if_data sdata)

Definition at line 154 of file mlme.c.

void ieee80211_sta_rx_notify ( struct ieee80211_sub_if_data sdata,
struct ieee80211_hdr hdr 
)

Definition at line 1483 of file mlme.c.

void ieee80211_sta_rx_queued_mgmt ( struct ieee80211_sub_if_data sdata,
struct sk_buff skb 
)

Definition at line 2566 of file mlme.c.

void ieee80211_sta_setup_sdata ( struct ieee80211_sub_if_data sdata)

Definition at line 3000 of file mlme.c.

void ieee80211_sta_tx_notify ( struct ieee80211_sub_if_data sdata,
struct ieee80211_hdr hdr,
bool  ack 
)

Definition at line 1535 of file mlme.c.

void ieee80211_sta_work ( struct ieee80211_sub_if_data sdata)

Definition at line 2772 of file mlme.c.

module_param ( max_nullfunc_tries  ,
int  ,
0644   
)
module_param ( max_probe_tries  ,
int  ,
0644   
)
module_param ( probe_wait_ms  ,
int  ,
0644   
)
MODULE_PARM_DESC ( max_nullfunc_tries  ,
"Maximum nullfunc tx tries before disconnecting (reason 4)."   
)
MODULE_PARM_DESC ( max_probe_tries  ,
"Maximum probe tries before disconnecting (reason 4)."   
)
MODULE_PARM_DESC ( probe_wait_ms  ,
"Maximum time(ms) to wait for probe response"" before disconnecting (reason 4)."   
)