diff options
Diffstat (limited to 'drivers/staging/vt6656/key.h')
| -rw-r--r-- | drivers/staging/vt6656/key.h | 133 |
1 files changed, 40 insertions, 93 deletions
diff --git a/drivers/staging/vt6656/key.h b/drivers/staging/vt6656/key.h index bd35d39621a..23e188d125b 100644 --- a/drivers/staging/vt6656/key.h +++ b/drivers/staging/vt6656/key.h @@ -30,17 +30,14 @@ #ifndef __KEY_H__ #define __KEY_H__ -#include "ttype.h" #include "tether.h" #include "80211mgr.h" -/*--------------------- Export Definitions -------------------------*/ #define MAX_GROUP_KEY 4 #define MAX_KEY_TABLE 11 #define MAX_KEY_LEN 32 #define AES_KEY_LEN 16 - #define AUTHENTICATOR_KEY 0x10000000 #define USE_KEYRSC 0x20000000 #define PAIRWISE_KEY 0x40000000 @@ -54,32 +51,31 @@ #define KEY_CTL_CCMP 0x03 #define KEY_CTL_INVALID 0xFF - typedef struct tagSKeyItem { - BOOL bKeyValid; + bool bKeyValid; u32 uKeyLength; - BYTE abyKey[MAX_KEY_LEN]; - QWORD KeyRSC; - DWORD dwTSC47_16; - WORD wTSC15_0; - BYTE byCipherSuite; - BYTE byReserved0; - DWORD dwKeyIndex; + u8 abyKey[MAX_KEY_LEN]; + u64 KeyRSC; + u32 dwTSC47_16; + u16 wTSC15_0; + u8 byCipherSuite; + u8 byReserved0; + u32 dwKeyIndex; void *pvKeyTable; } SKeyItem, *PSKeyItem; //64 typedef struct tagSKeyTable { - BYTE abyBSSID[ETH_ALEN]; /* 6 */ - BYTE byReserved0[2]; //8 + u8 abyBSSID[ETH_ALEN]; /* 6 */ + u8 byReserved0[2]; //8 SKeyItem PairwiseKey; SKeyItem GroupKey[MAX_GROUP_KEY]; //64*5 = 320, 320+8=328 - DWORD dwGTKeyIndex; // GroupTransmitKey Index - BOOL bInUse; - WORD wKeyCtl; - BOOL bSoftWEP; - BYTE byReserved1[6]; + u32 dwGTKeyIndex; // GroupTransmitKey Index + bool bInUse; + u16 wKeyCtl; + bool bSoftWEP; + u8 byReserved1[6]; } SKeyTable, *PSKeyTable; //352 typedef struct tagSKeyManagement @@ -87,79 +83,30 @@ typedef struct tagSKeyManagement SKeyTable KeyTable[MAX_KEY_TABLE]; } SKeyManagement, *PSKeyManagement; -/*--------------------- Export Types ------------------------------*/ - -/*--------------------- Export Macros ------------------------------*/ - -/*--------------------- Export Classes ----------------------------*/ - -/*--------------------- Export Variables --------------------------*/ - -/*--------------------- Export Functions --------------------------*/ - -void KeyvInitTable(void *pDeviceHandler, PSKeyManagement pTable); - -BOOL KeybGetKey(PSKeyManagement pTable, PBYTE pbyBSSID, DWORD dwKeyIndex, - PSKeyItem *pKey); - -BOOL KeybSetKey( - void *pDeviceHandler, - PSKeyManagement pTable, - PBYTE pbyBSSID, - DWORD dwKeyIndex, - u32 uKeyLength, - PQWORD pKeyRSC, - PBYTE pbyKey, - BYTE byKeyDecMode - ); - -BOOL KeybRemoveKey( - void *pDeviceHandler, - PSKeyManagement pTable, - PBYTE pbyBSSID, - DWORD dwKeyIndex - ); - -BOOL KeybRemoveAllKey( - void *pDeviceHandler, - PSKeyManagement pTable, - PBYTE pbyBSSID - ); - -void KeyvRemoveWEPKey( - void *pDeviceHandler, - PSKeyManagement pTable, - DWORD dwKeyIndex - ); - -void KeyvRemoveAllWEPKey( - void *pDeviceHandler, - PSKeyManagement pTable - ); - -BOOL KeybGetTransmitKey(PSKeyManagement pTable, PBYTE pbyBSSID, DWORD dwKeyType, - PSKeyItem *pKey); - -BOOL KeybCheckPairewiseKey(PSKeyManagement pTable, PSKeyItem *pKey); - -BOOL KeybSetDefaultKey( - void *pDeviceHandler, - PSKeyManagement pTable, - DWORD dwKeyIndex, - u32 uKeyLength, - PQWORD pKeyRSC, - PBYTE pbyKey, - BYTE byKeyDecMode - ); - -BOOL KeybSetAllGroupKey( - void *pDeviceHandler, - PSKeyManagement pTable, - DWORD dwKeyIndex, - u32 uKeyLength, - PQWORD pKeyRSC, - PBYTE pbyKey, - BYTE byKeyDecMode - ); +void KeyvInitTable(struct vnt_private *, PSKeyManagement pTable); + +int KeybGetKey(PSKeyManagement pTable, u8 *pbyBSSID, u32 dwKeyIndex, + PSKeyItem *pKey); + +int KeybSetKey(struct vnt_private *, PSKeyManagement pTable, u8 *pbyBSSID, + u32 dwKeyIndex, u32 uKeyLength, u64 *KeyRSC, u8 *pbyKey, + u8 byKeyDecMode); + +int KeybRemoveKey(struct vnt_private *, PSKeyManagement pTable, + u8 *pbyBSSID, u32 dwKeyIndex); + +int KeybRemoveAllKey(struct vnt_private *, PSKeyManagement pTable, + u8 *pbyBSSID); + +int KeybGetTransmitKey(PSKeyManagement pTable, u8 *pbyBSSID, u32 dwKeyType, + PSKeyItem *pKey); + +int KeybSetDefaultKey(struct vnt_private *, PSKeyManagement pTable, + u32 dwKeyIndex, u32 uKeyLength, u64 *KeyRSC, u8 *pbyKey, + u8 byKeyDecMode); + +int KeybSetAllGroupKey(struct vnt_private *, PSKeyManagement pTable, + u32 dwKeyIndex, u32 uKeyLength, u64 *KeyRSC, u8 *pbyKey, + u8 byKeyDecMode); #endif /* __KEY_H__ */ |
