Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
sta_info.h File Reference
#include <linux/list.h>
#include <linux/types.h>
#include <linux/if_ether.h>
#include <linux/workqueue.h>
#include <linux/average.h>
#include <linux/etherdevice.h>
#include "key.h"

Go to the source code of this file.

Data Structures

struct  tid_ampdu_tx
 
struct  tid_ampdu_rx
 
struct  sta_ampdu_mlme
 
struct  sta_info
 

Macros

#define STA_TID_NUM   16
 
#define ADDBA_RESP_INTERVAL   HZ
 
#define HT_AGG_MAX_RETRIES   15
 
#define HT_AGG_BURST_RETRIES   3
 
#define HT_AGG_RETRIES_PERIOD   (15 * HZ)
 
#define HT_AGG_STATE_DRV_READY   0
 
#define HT_AGG_STATE_RESPONSE_RECEIVED   1
 
#define HT_AGG_STATE_OPERATIONAL   2
 
#define HT_AGG_STATE_STOPPING   3
 
#define HT_AGG_STATE_WANT_START   4
 
#define HT_AGG_STATE_WANT_STOP   5
 
#define STA_HASH_SIZE   256
 
#define STA_HASH(sta)   (sta[5])
 
#define STA_MAX_TX_BUFFER   64
 
#define STA_TX_BUFFER_EXPIRE   (10 * HZ)
 
#define STA_INFO_CLEANUP_INTERVAL   (10 * HZ)
 
#define for_each_sta_info(local, _addr, _sta, nxt)
 

Enumerations

enum  ieee80211_sta_info_flags {
  WLAN_STA_AUTH, WLAN_STA_ASSOC, WLAN_STA_PS_STA, WLAN_STA_AUTHORIZED,
  WLAN_STA_SHORT_PREAMBLE, WLAN_STA_WME, WLAN_STA_WDS, WLAN_STA_CLEAR_PS_FILT,
  WLAN_STA_MFP, WLAN_STA_BLOCK_BA, WLAN_STA_PS_DRIVER, WLAN_STA_PSPOLL,
  WLAN_STA_TDLS_PEER, WLAN_STA_TDLS_PEER_AUTH, WLAN_STA_UAPSD, WLAN_STA_SP,
  WLAN_STA_4ADDR_EVENT, WLAN_STA_INSERTED, WLAN_STA_RATE_CONTROL, WLAN_STA_TOFFSET_KNOWN
}
 

Functions

int sta_info_move_state (struct sta_info *sta, enum ieee80211_sta_state new_state)
 
void ieee80211_assign_tid_tx (struct sta_info *sta, int tid, struct tid_ampdu_tx *tid_tx)
 
struct sta_infosta_info_get (struct ieee80211_sub_if_data *sdata, const u8 *addr)
 
struct sta_infosta_info_get_bss (struct ieee80211_sub_if_data *sdata, const u8 *addr)
 
struct sta_infosta_info_get_by_idx (struct ieee80211_sub_if_data *sdata, int idx)
 
struct sta_infosta_info_alloc (struct ieee80211_sub_if_data *sdata, const u8 *addr, gfp_t gfp)
 
void sta_info_free (struct ieee80211_local *local, struct sta_info *sta)
 
int sta_info_insert (struct sta_info *sta)
 
int sta_info_insert_rcu (struct sta_info *sta) __acquires(RCU)
 
int __must_check __sta_info_destroy (struct sta_info *sta)
 
int sta_info_destroy_addr (struct ieee80211_sub_if_data *sdata, const u8 *addr)
 
int sta_info_destroy_addr_bss (struct ieee80211_sub_if_data *sdata, const u8 *addr)
 
void sta_info_recalc_tim (struct sta_info *sta)
 
void sta_info_init (struct ieee80211_local *local)
 
void sta_info_stop (struct ieee80211_local *local)
 
int sta_info_flush (struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata)
 
void sta_set_rate_info_tx (struct sta_info *sta, const struct ieee80211_tx_rate *rate, struct rate_info *rinfo)
 
void ieee80211_sta_expire (struct ieee80211_sub_if_data *sdata, unsigned long exp_time)
 
void ieee80211_sta_ps_deliver_wakeup (struct sta_info *sta)
 
void ieee80211_sta_ps_deliver_poll_response (struct sta_info *sta)
 
void ieee80211_sta_ps_deliver_uapsd (struct sta_info *sta)
 

Macro Definition Documentation

#define ADDBA_RESP_INTERVAL   HZ

Definition at line 84 of file sta_info.h.

#define for_each_sta_info (   local,
  _addr,
  _sta,
  nxt 
)
Value:
for ( /* initialise loop */ \
_sta = rcu_dereference(local->sta_hash[STA_HASH(_addr)]),\
nxt = _sta ? rcu_dereference(_sta->hnext) : NULL; \
/* typecheck */ \
for_each_sta_info_type_check(local, (_addr), _sta, nxt),\
/* continue condition */ \
_sta; \
/* advance loop */ \
_sta = nxt, \
nxt = _sta ? rcu_dereference(_sta->hnext) : NULL \
) \
/* compare address and run code only if it matches */ \
if (ether_addr_equal(_sta->sta.addr, (_addr)))

Definition at line 499 of file sta_info.h.

#define HT_AGG_BURST_RETRIES   3

Definition at line 86 of file sta_info.h.

#define HT_AGG_MAX_RETRIES   15

Definition at line 85 of file sta_info.h.

#define HT_AGG_RETRIES_PERIOD   (15 * HZ)

Definition at line 87 of file sta_info.h.

#define HT_AGG_STATE_DRV_READY   0

Definition at line 89 of file sta_info.h.

#define HT_AGG_STATE_OPERATIONAL   2

Definition at line 91 of file sta_info.h.

#define HT_AGG_STATE_RESPONSE_RECEIVED   1

Definition at line 90 of file sta_info.h.

#define HT_AGG_STATE_STOPPING   3

Definition at line 92 of file sta_info.h.

#define HT_AGG_STATE_WANT_START   4

Definition at line 93 of file sta_info.h.

#define HT_AGG_STATE_WANT_STOP   5

Definition at line 94 of file sta_info.h.

#define STA_HASH (   sta)    (sta[5])

Definition at line 468 of file sta_info.h.

#define STA_HASH_SIZE   256

Definition at line 467 of file sta_info.h.

#define STA_INFO_CLEANUP_INTERVAL   (10 * HZ)

Definition at line 480 of file sta_info.h.

#define STA_MAX_TX_BUFFER   64

Definition at line 472 of file sta_info.h.

#define STA_TID_NUM   16

Definition at line 83 of file sta_info.h.

#define STA_TX_BUFFER_EXPIRE   (10 * HZ)

Definition at line 476 of file sta_info.h.

Enumeration Type Documentation

enum ieee80211_sta_info_flags - Stations flags

These flags are used with &struct sta_info's member, but only indirectly with set_sta_flag() and friends.

: Station is authenticated. : Station is associated. : Station is in power-save mode : Station is authorized to send/receive traffic. This bit is always checked so needs to be enabled for all stations when virtual port control is not in use. : Station is capable of receiving short-preamble frames. : Station is a QoS-STA. : Station is one of our WDS peers. : Clear PS filter in hardware (using the IEEE80211_TX_CTL_CLEAR_PS_FILT control flag) when the next frame to this station is transmitted. : Management frame protection is used with this STA. : Used to deny ADDBA requests (both TX and RX) during suspend/resume and station removal. : driver requires keeping this station in power-save mode logically to flush frames that might still be in the queues : Station sent PS-poll while driver was keeping station in power-save mode, reply when the driver unblocks. : Station is a TDLS peer. : This TDLS peer is authorized to send direct packets. This means the link is enabled. : Station requested unscheduled SP while driver was keeping station in power-save mode, reply when the driver unblocks the station. : Station is in a service period, so don't try to reply to other uAPSD trigger frames or PS-Poll. : 4-addr event was already sent for this frame. : This station is inserted into the hash table. : rate control was initialized for this station. : toffset calculated for this station is valid.

Enumerator:
WLAN_STA_AUTH 
WLAN_STA_ASSOC 
WLAN_STA_PS_STA 
WLAN_STA_AUTHORIZED 
WLAN_STA_SHORT_PREAMBLE 
WLAN_STA_WME 
WLAN_STA_WDS 
WLAN_STA_CLEAR_PS_FILT 
WLAN_STA_MFP 
WLAN_STA_BLOCK_BA 
WLAN_STA_PS_DRIVER 
WLAN_STA_PSPOLL 
WLAN_STA_TDLS_PEER 
WLAN_STA_TDLS_PEER_AUTH 
WLAN_STA_UAPSD 
WLAN_STA_SP 
WLAN_STA_4ADDR_EVENT 
WLAN_STA_INSERTED 
WLAN_STA_RATE_CONTROL 
WLAN_STA_TOFFSET_KNOWN 

Definition at line 60 of file sta_info.h.

Function Documentation

int __must_check __sta_info_destroy ( struct sta_info sta)

Definition at line 718 of file sta_info.c.

void ieee80211_assign_tid_tx ( struct sta_info sta,
int  tid,
struct tid_ampdu_tx tid_tx 
)

Definition at line 144 of file agg-tx.c.

void ieee80211_sta_expire ( struct ieee80211_sub_if_data sdata,
unsigned long  exp_time 
)

Definition at line 883 of file sta_info.c.

void ieee80211_sta_ps_deliver_poll_response ( struct sta_info sta)

Definition at line 1252 of file sta_info.c.

void ieee80211_sta_ps_deliver_uapsd ( struct sta_info sta)

Definition at line 1268 of file sta_info.c.

void ieee80211_sta_ps_deliver_wakeup ( struct sta_info sta)

Definition at line 958 of file sta_info.c.

struct sta_info* sta_info_alloc ( struct ieee80211_sub_if_data sdata,
const u8 addr,
gfp_t  gfp 
)
read

Definition at line 294 of file sta_info.c.

int sta_info_destroy_addr ( struct ieee80211_sub_if_data sdata,
const u8 addr 
)

Definition at line 790 of file sta_info.c.

int sta_info_destroy_addr_bss ( struct ieee80211_sub_if_data sdata,
const u8 addr 
)

Definition at line 803 of file sta_info.c.

int sta_info_flush ( struct ieee80211_local local,
struct ieee80211_sub_if_data sdata 
)

sta_info_flush - flush matching STA entries from the STA table

Returns the number of removed STA entries.

: local interface data : matching rule for the net device (sta->dev) or NULL to match all STAs

Definition at line 863 of file sta_info.c.

void sta_info_free ( struct ieee80211_local local,
struct sta_info sta 
)

sta_info_free - free STA

: pointer to the global information : STA info to free

This function must undo everything done by sta_info_alloc() that may happen before sta_info_insert(). It may only be called when sta_info_insert() has not been attempted (and if that fails, the station is freed anyway.)

Definition at line 231 of file sta_info.c.

struct sta_info* sta_info_get ( struct ieee80211_sub_if_data sdata,
const u8 addr 
)
read

Definition at line 159 of file sta_info.c.

struct sta_info* sta_info_get_bss ( struct ieee80211_sub_if_data sdata,
const u8 addr 
)
read

Definition at line 181 of file sta_info.c.

struct sta_info* sta_info_get_by_idx ( struct ieee80211_sub_if_data sdata,
int  idx 
)
read

Definition at line 200 of file sta_info.c.

void sta_info_init ( struct ieee80211_local local)

Definition at line 839 of file sta_info.c.

int sta_info_insert ( struct sta_info sta)

Definition at line 496 of file sta_info.c.

int sta_info_insert_rcu ( struct sta_info sta)

Definition at line 470 of file sta_info.c.

int sta_info_move_state ( struct sta_info sta,
enum ieee80211_sta_state  new_state 
)

Definition at line 1358 of file sta_info.c.

void sta_info_recalc_tim ( struct sta_info sta)

Definition at line 541 of file sta_info.c.

void sta_info_stop ( struct ieee80211_local local)

Definition at line 849 of file sta_info.c.

void sta_set_rate_info_tx ( struct sta_info sta,
const struct ieee80211_tx_rate rate,
struct rate_info rinfo 
)

Definition at line 384 of file cfg.c.