#include <linux/module.h>
#include <linux/init.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 646 of file kernel-3.2/sta_info.c.
static void __bss_tim_set | ( | struct ieee80211_if_ap * | bss, |
u16 | aid | ||
) | [inline, static] |
Definition at line 637 of file kernel-3.2/sta_info.c.
static int __must_check __sta_info_destroy | ( | struct sta_info * | sta | ) | [static] |
Definition at line 852 of file kernel-3.2/sta_info.c.
static void __sta_info_free | ( | struct ieee80211_local * | local, |
struct sta_info * | sta | ||
) | [static] |
__sta_info_free - internal STA free helper
: 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().
Definition at line 215 of file kernel-3.2/sta_info.c.
static void clear_sta_ps_flags | ( | void * | _sta | ) | [static] |
Definition at line 1117 of file kernel-3.2/sta_info.c.
struct ieee80211_sta* ieee80211_find_sta | ( | struct ieee80211_vif * | vif, |
const u8 * | addr | ||
) | [read] |
Definition at line 1098 of file kernel-3.2/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 1075 of file kernel-3.2/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 1170 of file kernel-3.2/sta_info.c.
void ieee80211_sta_block_awake | ( | struct ieee80211_hw * | hw, |
struct ieee80211_sta * | pubsta, | ||
bool | block | ||
) |
Definition at line 1465 of file kernel-3.2/sta_info.c.
void ieee80211_sta_eosp_irqsafe | ( | struct ieee80211_sta * | pubsta | ) |
Definition at line 1479 of file kernel-3.2/sta_info.c.
void ieee80211_sta_expire | ( | struct ieee80211_sub_if_data * | sdata, |
unsigned long | exp_time | ||
) |
Definition at line 1057 of file kernel-3.2/sta_info.c.
void ieee80211_sta_ps_deliver_poll_response | ( | struct sta_info * | sta | ) |
Definition at line 1415 of file kernel-3.2/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 1234 of file kernel-3.2/sta_info.c.
void ieee80211_sta_ps_deliver_uapsd | ( | struct sta_info * | sta | ) |
Definition at line 1431 of file kernel-3.2/sta_info.c.
void ieee80211_sta_ps_deliver_wakeup | ( | struct sta_info * | sta | ) |
Definition at line 1126 of file kernel-3.2/sta_info.c.
void ieee80211_sta_set_buffered | ( | struct ieee80211_sta * | pubsta, |
u8 | tid, | ||
bool | buffered | ||
) |
Definition at line 1504 of file kernel-3.2/sta_info.c.
static unsigned long ieee80211_tids_for_ac | ( | int | ac | ) | [static] |
Definition at line 655 of file kernel-3.2/sta_info.c.
struct sta_info* sta_info_alloc | ( | struct ieee80211_sub_if_data * | sdata, |
u8 * | addr, | ||
gfp_t | gfp | ||
) | [read] |
Definition at line 282 of file kernel-3.2/sta_info.c.
static bool sta_info_buffer_expired | ( | struct sta_info * | sta, |
struct sk_buff * | skb | ||
) | [static] |
Definition at line 735 of file kernel-3.2/sta_info.c.
static void sta_info_cleanup | ( | unsigned long | data | ) | [static] |
Definition at line 988 of file kernel-3.2/sta_info.c.
static bool sta_info_cleanup_expire_buffered | ( | struct ieee80211_local * | local, |
struct sta_info * | sta | ||
) | [static] |
Definition at line 835 of file kernel-3.2/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 755 of file kernel-3.2/sta_info.c.
int sta_info_destroy_addr | ( | struct ieee80211_sub_if_data * | sdata, |
const u8 * | addr | ||
) |
Definition at line 961 of file kernel-3.2/sta_info.c.
int sta_info_destroy_addr_bss | ( | struct ieee80211_sub_if_data * | sdata, |
const u8 * | addr | ||
) |
Definition at line 974 of file kernel-3.2/sta_info.c.
static int sta_info_finish_insert | ( | struct sta_info * | sta, |
bool | async, | ||
bool | dummy_reinsert | ||
) | [static] |
Definition at line 341 of file kernel-3.2/sta_info.c.
static void sta_info_finish_pending | ( | struct ieee80211_local * | local | ) | [static] |
Definition at line 408 of file kernel-3.2/sta_info.c.
static void sta_info_finish_work | ( | struct work_struct * | work | ) | [static] |
Definition at line 427 of file kernel-3.2/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 1036 of file kernel-3.2/sta_info.c.
struct sta_info* sta_info_get | ( | struct ieee80211_sub_if_data * | sdata, |
const u8 * | addr | ||
) | [read] |
Definition at line 94 of file kernel-3.2/sta_info.c.
struct sta_info* sta_info_get_bss | ( | struct ieee80211_sub_if_data * | sdata, |
const u8 * | addr | ||
) | [read] |
Definition at line 139 of file kernel-3.2/sta_info.c.
struct sta_info* sta_info_get_bss_rx | ( | struct ieee80211_sub_if_data * | sdata, |
const u8 * | addr | ||
) | [read] |
Definition at line 165 of file kernel-3.2/sta_info.c.
struct sta_info* sta_info_get_by_idx | ( | struct ieee80211_sub_if_data * | sdata, |
int | idx | ||
) | [read] |
Definition at line 186 of file kernel-3.2/sta_info.c.
struct sta_info* sta_info_get_rx | ( | struct ieee80211_sub_if_data * | sdata, |
const u8 * | addr | ||
) | [read] |
Definition at line 115 of file kernel-3.2/sta_info.c.
static void sta_info_hash_add | ( | struct ieee80211_local * | local, |
struct sta_info * | sta | ||
) | [static] |
Definition at line 231 of file kernel-3.2/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 66 of file kernel-3.2/sta_info.c.
void sta_info_init | ( | struct ieee80211_local * | local | ) |
Definition at line 1010 of file kernel-3.2/sta_info.c.
int sta_info_insert | ( | struct sta_info * | sta | ) |
Definition at line 609 of file kernel-3.2/sta_info.c.
static int sta_info_insert_check | ( | struct sta_info * | sta | ) | [static] |
Definition at line 437 of file kernel-3.2/sta_info.c.
static int sta_info_insert_ibss | ( | struct sta_info * | sta | ) | [static] |
Definition at line 456 of file kernel-3.2/sta_info.c.
static int sta_info_insert_non_ibss | ( | struct sta_info * | sta | ) | [static] |
Definition at line 495 of file kernel-3.2/sta_info.c.
int sta_info_insert_rcu | ( | struct sta_info * | sta | ) |
Definition at line 560 of file kernel-3.2/sta_info.c.
void sta_info_recalc_tim | ( | struct sta_info * | sta | ) |
Definition at line 673 of file kernel-3.2/sta_info.c.
int sta_info_reinsert | ( | struct sta_info * | sta | ) |
Definition at line 619 of file kernel-3.2/sta_info.c.
void sta_info_stop | ( | struct ieee80211_local * | local | ) |
Definition at line 1022 of file kernel-3.2/sta_info.c.
static int sta_prepare_rate_control | ( | struct ieee80211_local * | local, |
struct sta_info * | sta, | ||
gfp_t | gfp | ||
) | [static] |
Definition at line 265 of file kernel-3.2/sta_info.c.
static void sta_unblock | ( | struct work_struct * | wk | ) | [static] |
Definition at line 238 of file kernel-3.2/sta_info.c.