Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
key.h File Reference
#include <linux/types.h>
#include <linux/list.h>
#include <linux/crypto.h>
#include <linux/rcupdate.h>
#include <net/mac80211.h>

Go to the source code of this file.

Data Structures

struct  tkip_ctx
 
struct  ieee80211_key
 

Macros

#define NUM_DEFAULT_KEYS   4
 
#define NUM_DEFAULT_MGMT_KEYS   2
 
#define WEP_IV_LEN   4
 
#define WEP_ICV_LEN   4
 
#define ALG_CCMP_KEY_LEN   16
 
#define CCMP_HDR_LEN   8
 
#define CCMP_MIC_LEN   8
 
#define CCMP_TK_LEN   16
 
#define CCMP_PN_LEN   6
 
#define TKIP_IV_LEN   8
 
#define TKIP_ICV_LEN   4
 
#define CMAC_PN_LEN   6
 
#define NUM_RX_DATA_QUEUES   16
 
#define key_mtx_dereference(local, ref)   rcu_dereference_protected(ref, lockdep_is_held(&((local)->key_mtx)))
 

Enumerations

enum  ieee80211_internal_key_flags { KEY_FLAG_UPLOADED_TO_HARDWARE = BIT(0), KEY_FLAG_TAINTED = BIT(1) }
 
enum  ieee80211_internal_tkip_state { TKIP_STATE_NOT_INIT, TKIP_STATE_PHASE1_DONE, TKIP_STATE_PHASE1_HW_UPLOADED }
 

Functions

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 __must_check 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_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)
 
void ieee80211_free_keys (struct ieee80211_sub_if_data *sdata)
 
void ieee80211_enable_keys (struct ieee80211_sub_if_data *sdata)
 
void ieee80211_disable_keys (struct ieee80211_sub_if_data *sdata)
 

Macro Definition Documentation

#define ALG_CCMP_KEY_LEN   16

Definition at line 24 of file key.h.

#define CCMP_HDR_LEN   8

Definition at line 25 of file key.h.

#define CCMP_MIC_LEN   8

Definition at line 26 of file key.h.

#define CCMP_PN_LEN   6

Definition at line 28 of file key.h.

#define CCMP_TK_LEN   16

Definition at line 27 of file key.h.

#define CMAC_PN_LEN   6

Definition at line 31 of file key.h.

#define key_mtx_dereference (   local,
  ref 
)    rcu_dereference_protected(ref, lockdep_is_held(&((local)->key_mtx)))

Definition at line 147 of file key.h.

#define NUM_DEFAULT_KEYS   4

Definition at line 19 of file key.h.

#define NUM_DEFAULT_MGMT_KEYS   2

Definition at line 20 of file key.h.

#define NUM_RX_DATA_QUEUES   16

Definition at line 33 of file key.h.

#define TKIP_ICV_LEN   4

Definition at line 30 of file key.h.

#define TKIP_IV_LEN   8

Definition at line 29 of file key.h.

#define WEP_ICV_LEN   4

Definition at line 23 of file key.h.

#define WEP_IV_LEN   4

Definition at line 22 of file key.h.

Enumeration Type Documentation

enum ieee80211_internal_key_flags - internal key flags

: Indicates that this key is present in the hardware for TX crypto hardware acceleration. : Key is tainted and packets should be dropped.

Enumerator:
KEY_FLAG_UPLOADED_TO_HARDWARE 
KEY_FLAG_TAINTED 

Definition at line 46 of file key.h.

Enumerator:
TKIP_STATE_NOT_INIT 
TKIP_STATE_PHASE1_DONE 
TKIP_STATE_PHASE1_HW_UPLOADED 

Definition at line 51 of file key.h.

Function Documentation

void __ieee80211_key_free ( struct ieee80211_key key)

Definition at line 488 of file key.c.

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.

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 __must_check 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.