Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
rtl871x_security.h File Reference
#include "osdep_service.h"
#include "drv_types.h"

Go to the source code of this file.

Data Structures

union  pn48
 
union  Keytype
 
struct  RT_PMKID_LIST
 
struct  security_priv
 
struct  mic_data
 

Macros

#define _NO_PRIVACY_   0x0
 
#define _WEP40_   0x1
 
#define _TKIP_   0x2
 
#define _TKIP_WTMIC_   0x3
 
#define _AES_   0x4
 
#define _WEP104_   0x5
 
#define _WPA_IE_ID_   0xdd
 
#define _WPA2_IE_ID_   0x30
 
#define GET_ENCRY_ALGO(psecuritypriv, psta, encry_algo, bmcst)
 
#define SET_ICE_IV_LEN(iv_len, icv_len, encrypt)
 
#define GET_TKIP_PN(iv, txpn)
 
#define ROL32(A, n)   (((A) << (n)) | (((A)>>(32-(n))) & ((1UL << (n)) - 1)))
 
#define ROR32(A, n)   ROL32((A), 32 - (n))
 

Functions

void seccalctkipmic (u8 *key, u8 *header, u8 *data, u32 data_len, u8 *Miccode, u8 priority)
 
void r8712_secmicsetkey (struct mic_data *pmicdata, u8 *key)
 
void r8712_secmicappend (struct mic_data *pmicdata, u8 *src, u32 nBytes)
 
void r8712_secgetmic (struct mic_data *pmicdata, u8 *dst)
 
u32 r8712_aes_encrypt (struct _adapter *padapter, u8 *pxmitframe)
 
u32 r8712_tkip_encrypt (struct _adapter *padapter, u8 *pxmitframe)
 
void r8712_wep_encrypt (struct _adapter *padapter, u8 *pxmitframe)
 
u32 r8712_aes_decrypt (struct _adapter *padapter, u8 *precvframe)
 
u32 r8712_tkip_decrypt (struct _adapter *padapter, u8 *precvframe)
 
void r8712_wep_decrypt (struct _adapter *padapter, u8 *precvframe)
 
void r8712_use_tkipkey_handler (void *FunctionContext)
 

Macro Definition Documentation

#define _AES_   0x4

Definition at line 36 of file rtl871x_security.h.

#define _NO_PRIVACY_   0x0

Definition at line 32 of file rtl871x_security.h.

#define _TKIP_   0x2

Definition at line 34 of file rtl871x_security.h.

#define _TKIP_WTMIC_   0x3

Definition at line 35 of file rtl871x_security.h.

#define _WEP104_   0x5

Definition at line 37 of file rtl871x_security.h.

#define _WEP40_   0x1

Definition at line 33 of file rtl871x_security.h.

#define _WPA2_IE_ID_   0x30

Definition at line 40 of file rtl871x_security.h.

#define _WPA_IE_ID_   0xdd

Definition at line 39 of file rtl871x_security.h.

#define GET_ENCRY_ALGO (   psecuritypriv,
  psta,
  encry_algo,
  bmcst 
)
Value:
do { \
switch (psecuritypriv->AuthAlgrthm) { \
case 0: \
case 1: \
case 3: \
encry_algo = (u8)psecuritypriv->PrivacyAlgrthm; \
break; \
case 2: \
if (bmcst) \
encry_algo = (u8)psecuritypriv->XGrpPrivacy; \
else \
encry_algo = (u8)psta->XPrivacy; \
break; \
} \
} while (0)

Definition at line 144 of file rtl871x_security.h.

#define GET_TKIP_PN (   iv,
  txpn 
)
Value:
do {\
txpn._byte_.TSC0 = iv[2];\
txpn._byte_.TSC1 = iv[0];\
txpn._byte_.TSC2 = iv[4];\
txpn._byte_.TSC3 = iv[5];\
txpn._byte_.TSC4 = iv[6];\
txpn._byte_.TSC5 = iv[7];\
} while (0)

Definition at line 182 of file rtl871x_security.h.

#define ROL32 (   A,
  n 
)    (((A) << (n)) | (((A)>>(32-(n))) & ((1UL << (n)) - 1)))

Definition at line 192 of file rtl871x_security.h.

#define ROR32 (   A,
  n 
)    ROL32((A), 32 - (n))

Definition at line 193 of file rtl871x_security.h.

#define SET_ICE_IV_LEN (   iv_len,
  icv_len,
  encrypt 
)
Value:
do {\
switch (encrypt) { \
case _WEP40_: \
case _WEP104_: \
iv_len = 4; \
icv_len = 4; \
break; \
case _TKIP_: \
iv_len = 8; \
icv_len = 4; \
break; \
case _AES_: \
iv_len = 8; \
icv_len = 8; \
break; \
default: \
iv_len = 0; \
icv_len = 0; \
break; \
} \
} while (0)

Definition at line 160 of file rtl871x_security.h.

Function Documentation

u32 r8712_aes_decrypt ( struct _adapter padapter,
u8 precvframe 
)

Definition at line 1360 of file rtl871x_security.c.

u32 r8712_aes_encrypt ( struct _adapter padapter,
u8 pxmitframe 
)

Definition at line 1152 of file rtl871x_security.c.

void r8712_secgetmic ( struct mic_data pmicdata,
u8 dst 
)

Definition at line 332 of file rtl871x_security.c.

void r8712_secmicappend ( struct mic_data pmicdata,
u8 src,
u32  nBytes 
)

Definition at line 323 of file rtl871x_security.c.

void r8712_secmicsetkey ( struct mic_data pmicdata,
u8 key 
)

Definition at line 291 of file rtl871x_security.c.

u32 r8712_tkip_decrypt ( struct _adapter padapter,
u8 precvframe 
)

Definition at line 651 of file rtl871x_security.c.

u32 r8712_tkip_encrypt ( struct _adapter padapter,
u8 pxmitframe 
)

Definition at line 574 of file rtl871x_security.c.

void r8712_use_tkipkey_handler ( void FunctionContext)

Definition at line 1399 of file rtl871x_security.c.

void r8712_wep_decrypt ( struct _adapter padapter,
u8 precvframe 
)

Definition at line 223 of file rtl871x_security.c.

void r8712_wep_encrypt ( struct _adapter padapter,
u8 pxmitframe 
)

Definition at line 168 of file rtl871x_security.c.

void seccalctkipmic ( u8 key,
u8 header,
u8 data,
u32  data_len,
u8 Miccode,
u8  priority 
)

Definition at line 350 of file rtl871x_security.c.