#include <linux/module.h>
#include <linux/init.h>
#include <linux/etherdevice.h>
#include <linux/netdevice.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/skbuff.h>
#include <linux/if_arp.h>
#include <linux/timer.h>
#include <linux/rtnetlink.h>
#include <net/mac80211.h>
#include "ieee80211_i.h"
#include "driver-ops.h"
#include "rate.h"
#include "sta_info.h"
#include "debugfs_sta.h"
#include "mesh.h"
#include "wme.h"
Go to the source code of this file.
static void __bss_tim_clear | ( | struct ieee80211_if_ap * | bss, |
u16 | aid | ||
) | [inline, static] |
Definition at line 455 of file kernel-3.5/sta_info.c.
static void __bss_tim_set | ( | struct ieee80211_if_ap * | bss, |
u16 | aid | ||
) | [inline, static] |
Definition at line 446 of file kernel-3.5/sta_info.c.
int __must_check __sta_info_destroy | ( | struct sta_info * | sta | ) |
Definition at line 661 of file kernel-3.5/sta_info.c.
static void clear_sta_ps_flags | ( | void * | _sta | ) | [static] |
Definition at line 945 of file kernel-3.5/sta_info.c.
struct ieee80211_sta* ieee80211_find_sta | ( | struct ieee80211_vif * | vif, |
const u8 * | addr | ||
) | [read] |
Definition at line 926 of file kernel-3.5/sta_info.c.
struct ieee80211_sta* ieee80211_find_sta_by_ifaddr | ( | struct ieee80211_hw * | hw, |
const u8 * | addr, | ||
const u8 * | localaddr | ||
) | [read] |
Definition at line 903 of file kernel-3.5/sta_info.c.
static void ieee80211_send_null_response | ( | struct ieee80211_sub_if_data * | sdata, |
struct sta_info * | sta, | ||
int | tid, | ||
enum ieee80211_frame_release_type | reason | ||
) | [static] |
Definition at line 1000 of file kernel-3.5/sta_info.c.
void ieee80211_sta_block_awake | ( | struct ieee80211_hw * | hw, |
struct ieee80211_sta * | pubsta, | ||
bool | block | ||
) |
Definition at line 1297 of file kernel-3.5/sta_info.c.
void ieee80211_sta_eosp_irqsafe | ( | struct ieee80211_sta * | pubsta | ) |
Definition at line 1311 of file kernel-3.5/sta_info.c.
void ieee80211_sta_expire | ( | struct ieee80211_sub_if_data * | sdata, |
unsigned long | exp_time | ||
) |
Definition at line 879 of file kernel-3.5/sta_info.c.
void ieee80211_sta_ps_deliver_poll_response | ( | struct sta_info * | sta | ) |
Definition at line 1247 of file kernel-3.5/sta_info.c.
static void ieee80211_sta_ps_deliver_response | ( | struct sta_info * | sta, |
int | n_frames, | ||
u8 | ignored_acs, | ||
enum ieee80211_frame_release_type | reason | ||
) | [static] |
Definition at line 1064 of file kernel-3.5/sta_info.c.
void ieee80211_sta_ps_deliver_uapsd | ( | struct sta_info * | sta | ) |
Definition at line 1263 of file kernel-3.5/sta_info.c.
void ieee80211_sta_ps_deliver_wakeup | ( | struct sta_info * | sta | ) |
Definition at line 956 of file kernel-3.5/sta_info.c.
void ieee80211_sta_set_buffered | ( | struct ieee80211_sta * | pubsta, |
u8 | tid, | ||
bool | buffered | ||
) |
Definition at line 1336 of file kernel-3.5/sta_info.c.
static unsigned long ieee80211_tids_for_ac | ( | int | ac | ) | [static] |
Definition at line 464 of file kernel-3.5/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 232 of file kernel-3.5/sta_info.c.
static bool sta_info_buffer_expired | ( | struct sta_info * | sta, |
struct sk_buff * | skb | ||
) | [static] |
Definition at line 544 of file kernel-3.5/sta_info.c.
static void sta_info_cleanup | ( | unsigned long | data | ) | [static] |
Definition at line 813 of file kernel-3.5/sta_info.c.
static bool sta_info_cleanup_expire_buffered | ( | struct ieee80211_local * | local, |
struct sta_info * | sta | ||
) | [static] |
Definition at line 644 of file kernel-3.5/sta_info.c.
static bool sta_info_cleanup_expire_buffered_ac | ( | struct ieee80211_local * | local, |
struct sta_info * | sta, | ||
int | ac | ||
) | [static] |
Definition at line 564 of file kernel-3.5/sta_info.c.
int sta_info_destroy_addr | ( | struct ieee80211_sub_if_data * | sdata, |
const u8 * | addr | ||
) |
Definition at line 786 of file kernel-3.5/sta_info.c.
int sta_info_destroy_addr_bss | ( | struct ieee80211_sub_if_data * | sdata, |
const u8 * | addr | ||
) |
Definition at line 799 of file kernel-3.5/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 859 of file kernel-3.5/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 167 of file kernel-3.5/sta_info.c.
struct sta_info* sta_info_get | ( | struct ieee80211_sub_if_data * | sdata, |
const u8 * | addr | ||
) | [read] |
Definition at line 95 of file kernel-3.5/sta_info.c.
struct sta_info* sta_info_get_bss | ( | struct ieee80211_sub_if_data * | sdata, |
const u8 * | addr | ||
) | [read] |
Definition at line 117 of file kernel-3.5/sta_info.c.
struct sta_info* sta_info_get_by_idx | ( | struct ieee80211_sub_if_data * | sdata, |
int | idx | ||
) | [read] |
Definition at line 136 of file kernel-3.5/sta_info.c.
static void sta_info_hash_add | ( | struct ieee80211_local * | local, |
struct sta_info * | sta | ||
) | [static] |
Definition at line 180 of file kernel-3.5/sta_info.c.
static int sta_info_hash_del | ( | struct ieee80211_local * | local, |
struct sta_info * | sta | ||
) | [static] |
DOC: STA information lifetime rules
STA info structures (&struct sta_info) are managed in a hash table for faster lookup and a list for iteration. They are managed using RCU, i.e. access to the list and hash table is protected by RCU.
Upon allocating a STA info structure with sta_info_alloc(), the caller owns that structure. It must then insert it into the hash table using either sta_info_insert() or sta_info_insert_rcu(); only in the latter case (which acquires an rcu read section but must not be called from within one) will the pointer still be valid after the call. Note that the caller may not do much with the STA info before inserting it, in particular, it may not start any mesh peer link management or add encryption keys.
When the insertion fails (sta_info_insert()) returns non-zero), the structure will have been freed by sta_info_insert()!
Station entries are added by mac80211 when you establish a link with a peer. This means different things for the different type of interfaces we support. For a regular station this mean we add the AP sta when we receive an association response from the AP. For IBSS this occurs when get to know about a peer on the same IBSS. For WDS we add the sta for the peer immediately upon device open. When using AP mode we add stations for each respective station upon request from userspace through nl80211.
In order to remove a STA info structure, various sta_info_destroy_*() calls are available.
There is no concept of ownership on a STA entry, each structure is owned by the global hash table/list until it is removed. All users of the structure need to be RCU protected so that the structure won't be freed before they are done using it.
Definition at line 67 of file kernel-3.5/sta_info.c.
void sta_info_init | ( | struct ieee80211_local * | local | ) |
Definition at line 835 of file kernel-3.5/sta_info.c.
int sta_info_insert | ( | struct sta_info * | sta | ) |
Definition at line 437 of file kernel-3.5/sta_info.c.
static int sta_info_insert_check | ( | struct sta_info * | sta | ) | [static] |
Definition at line 293 of file kernel-3.5/sta_info.c.
static int sta_info_insert_drv_state | ( | struct ieee80211_local * | local, |
struct ieee80211_sub_if_data * | sdata, | ||
struct sta_info * | sta | ||
) | [static] |
Definition at line 312 of file kernel-3.5/sta_info.c.
static int sta_info_insert_finish | ( | struct sta_info * | sta | ) | [static] |
Definition at line 354 of file kernel-3.5/sta_info.c.
int sta_info_insert_rcu | ( | struct sta_info * | sta | ) |
Definition at line 411 of file kernel-3.5/sta_info.c.
int sta_info_move_state | ( | struct sta_info * | sta, |
enum ieee80211_sta_state | new_state | ||
) |
Definition at line 1353 of file kernel-3.5/sta_info.c.
void sta_info_recalc_tim | ( | struct sta_info * | sta | ) |
Definition at line 482 of file kernel-3.5/sta_info.c.
void sta_info_stop | ( | struct ieee80211_local * | local | ) |
Definition at line 845 of file kernel-3.5/sta_info.c.
static int sta_prepare_rate_control | ( | struct ieee80211_local * | local, |
struct sta_info * | sta, | ||
gfp_t | gfp | ||
) | [static] |
Definition at line 217 of file kernel-3.5/sta_info.c.
static void sta_unblock | ( | struct work_struct * | wk | ) | [static] |
Definition at line 188 of file kernel-3.5/sta_info.c.