Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
key.c File Reference
#include <linux/if_ether.h>
#include <linux/etherdevice.h>
#include <linux/list.h>
#include <linux/rcupdate.h>
#include <linux/rtnetlink.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 "debugfs_key.h"
#include "aes_ccm.h"
#include "aes_cmac.h"

Go to the source code of this file.

Functions

void ieee80211_set_default_key (struct ieee80211_sub_if_data *sdata, int idx, bool uni, bool multi)
 
void ieee80211_set_default_mgmt_key (struct ieee80211_sub_if_data *sdata, int idx)
 
struct ieee80211_keyieee80211_key_alloc (u32 cipher, int idx, size_t key_len, const u8 *key_data, size_t seq_len, const u8 *seq)
 
int ieee80211_key_link (struct ieee80211_key *key, struct ieee80211_sub_if_data *sdata, struct sta_info *sta)
 
void __ieee80211_key_free (struct ieee80211_key *key)
 
void ieee80211_key_free (struct ieee80211_local *local, struct ieee80211_key *key)
 
void ieee80211_enable_keys (struct ieee80211_sub_if_data *sdata)
 
void ieee80211_iter_keys (struct ieee80211_hw *hw, struct ieee80211_vif *vif, void(*iter)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_sta *sta, struct ieee80211_key_conf *key, void *data), void *iter_data)
 
 EXPORT_SYMBOL (ieee80211_iter_keys)
 
void ieee80211_disable_keys (struct ieee80211_sub_if_data *sdata)
 
void ieee80211_free_keys (struct ieee80211_sub_if_data *sdata)
 
void ieee80211_gtk_rekey_notify (struct ieee80211_vif *vif, const u8 *bssid, const u8 *replay_ctr, gfp_t gfp)
 
 EXPORT_SYMBOL_GPL (ieee80211_gtk_rekey_notify)
 
void ieee80211_get_key_tx_seq (struct ieee80211_key_conf *keyconf, struct ieee80211_key_seq *seq)
 
 EXPORT_SYMBOL (ieee80211_get_key_tx_seq)
 
void ieee80211_get_key_rx_seq (struct ieee80211_key_conf *keyconf, int tid, struct ieee80211_key_seq *seq)
 
 EXPORT_SYMBOL (ieee80211_get_key_rx_seq)
 

Function Documentation

void __ieee80211_key_free ( struct ieee80211_key key)

Definition at line 488 of file key.c.

EXPORT_SYMBOL ( ieee80211_iter_keys  )
EXPORT_SYMBOL ( ieee80211_get_key_tx_seq  )
EXPORT_SYMBOL ( ieee80211_get_key_rx_seq  )
EXPORT_SYMBOL_GPL ( ieee80211_gtk_rekey_notify  )
void ieee80211_disable_keys ( struct ieee80211_sub_if_data sdata)

Definition at line 565 of file key.c.

void ieee80211_enable_keys ( struct ieee80211_sub_if_data sdata)

Definition at line 511 of file key.c.

void ieee80211_free_keys ( struct ieee80211_sub_if_data sdata)

Definition at line 579 of file key.c.

void ieee80211_get_key_rx_seq ( struct ieee80211_key_conf keyconf,
int  tid,
struct ieee80211_key_seq seq 
)

ieee80211_get_key_rx_seq - get key RX sequence counter

: the parameter passed with the set key : The TID, or -1 for the management frame value (CCMP only); the value on TID 0 is also used for non-QoS frames. For CMAC, only TID 0 is valid. : buffer to receive the sequence data

This function allows a driver to retrieve the current RX IV/PNs for the given key. It must not be called if IV checking is done by the device and not by mac80211.

Note that this function may only be called when no RX processing can be done concurrently.

Definition at line 647 of file key.c.

void ieee80211_get_key_tx_seq ( struct ieee80211_key_conf keyconf,
struct ieee80211_key_seq seq 
)

ieee80211_get_key_tx_seq - get key TX sequence counter

: the parameter passed with the set key : buffer to receive the sequence data

This function allows a driver to retrieve the current TX IV/PN for the given key. It must not be called if IV generation is offloaded to the device.

Note that this function may only be called when no TX processing can be done concurrently, for example when queues are stopped and the stop has been synchronized.

Definition at line 607 of file key.c.

void ieee80211_gtk_rekey_notify ( struct ieee80211_vif vif,
const u8 bssid,
const u8 replay_ctr,
gfp_t  gfp 
)

ieee80211_gtk_rekey_notify - notify userspace supplicant of rekeying : virtual interface the rekeying was done on : The BSSID of the AP, for checking association : the new replay counter after GTK rekeying : allocation flags

Definition at line 596 of file key.c.

void ieee80211_iter_keys ( struct ieee80211_hw hw,
struct ieee80211_vif vif,
void(*)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_sta *sta, struct ieee80211_key_conf *key, void *data iter,
void iter_data 
)

ieee80211_iter_keys - iterate keys programmed into the device : pointer obtained from ieee80211_alloc_hw() : virtual interface to iterate, may be NULL for all : iterator function that will be called for each key : custom data to pass to the iterator function

This function can be used to iterate all the keys known to mac80211, even those that weren't previously programmed into the device. This is intended for use in WoWLAN if the device needs reprogramming of the keys during suspend. Note that due to locking reasons, it is also only safe to call this at few spots since it must hold the RTNL and be able to sleep.

The order in which the keys are iterated matches the order in which they were originally installed and handed to the set_key callback.

Definition at line 532 of file key.c.

struct ieee80211_key* ieee80211_key_alloc ( u32  cipher,
int  idx,
size_t  key_len,
const u8 key_data,
size_t  seq_len,
const u8 seq 
)
read

Definition at line 309 of file key.c.

void ieee80211_key_free ( struct ieee80211_local local,
struct ieee80211_key key 
)

Definition at line 503 of file key.c.

int ieee80211_key_link ( struct ieee80211_key key,
struct ieee80211_sub_if_data sdata,
struct sta_info sta 
)

Definition at line 422 of file key.c.

void ieee80211_set_default_key ( struct ieee80211_sub_if_data sdata,
int  idx,
bool  uni,
bool  multi 
)

Definition at line 215 of file key.c.

void ieee80211_set_default_mgmt_key ( struct ieee80211_sub_if_data sdata,
int  idx 
)

Definition at line 239 of file key.c.