aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/vt6655/key.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/vt6655/key.h')
-rw-r--r--drivers/staging/vt6655/key.h199
1 files changed, 97 insertions, 102 deletions
diff --git a/drivers/staging/vt6655/key.h b/drivers/staging/vt6655/key.h
index 39403d93aeb..4b8b4b6bd6c 100644
--- a/drivers/staging/vt6655/key.h
+++ b/drivers/staging/vt6655/key.h
@@ -40,7 +40,6 @@
#define MAX_KEY_LEN 32
#define AES_KEY_LEN 16
-
#define AUTHENTICATOR_KEY 0x10000000
#define USE_KEYRSC 0x20000000
#define PAIRWISE_KEY 0x40000000
@@ -54,42 +53,39 @@
#define KEY_CTL_CCMP 0x03
#define KEY_CTL_INVALID 0xFF
-
typedef struct tagSKeyItem
{
- BOOL bKeyValid;
- ULONG uKeyLength;
- BYTE abyKey[MAX_KEY_LEN];
- QWORD KeyRSC;
- DWORD dwTSC47_16;
- WORD wTSC15_0;
- BYTE byCipherSuite;
- BYTE byReserved0;
- DWORD dwKeyIndex;
- void *pvKeyTable;
+ bool bKeyValid;
+ unsigned long uKeyLength;
+ unsigned char abyKey[MAX_KEY_LEN];
+ QWORD KeyRSC;
+ unsigned long dwTSC47_16;
+ unsigned short wTSC15_0;
+ unsigned char byCipherSuite;
+ unsigned char byReserved0;
+ unsigned long dwKeyIndex;
+ void *pvKeyTable;
} SKeyItem, *PSKeyItem; //64
typedef struct tagSKeyTable
{
- BYTE abyBSSID[ETH_ALEN]; //6
- BYTE byReserved0[2]; //8
- SKeyItem PairwiseKey;
- SKeyItem GroupKey[MAX_GROUP_KEY]; //64*5 = 320, 320+8=328
- DWORD dwGTKeyIndex; // GroupTransmitKey Index
- BOOL bInUse;
- //2006-1116-01,<Modify> by NomadZhao
- //WORD wKeyCtl;
- //BOOL bSoftWEP;
- BOOL bSoftWEP;
- WORD wKeyCtl; // for address of wKeyCtl at align 4
-
- BYTE byReserved1[6];
+ unsigned char abyBSSID[ETH_ALEN]; //6
+ unsigned char byReserved0[2]; //8
+ SKeyItem PairwiseKey;
+ SKeyItem GroupKey[MAX_GROUP_KEY]; //64*5 = 320, 320+8=328
+ unsigned long dwGTKeyIndex; // GroupTransmitKey Index
+ bool bInUse;
+ //2006-1116-01,<Modify> by NomadZhao
+ bool bSoftWEP;
+ unsigned short wKeyCtl; // for address of wKeyCtl at align 4
+
+ unsigned char byReserved1[6];
} SKeyTable, *PSKeyTable; //348
typedef struct tagSKeyManagement
{
- SKeyTable KeyTable[MAX_KEY_TABLE];
-} SKeyManagement, * PSKeyManagement;
+ SKeyTable KeyTable[MAX_KEY_TABLE];
+} SKeyManagement, *PSKeyManagement;
/*--------------------- Export Types ------------------------------*/
@@ -101,84 +97,83 @@ typedef struct tagSKeyManagement
/*--------------------- Export Functions --------------------------*/
-void KeyvInitTable(PSKeyManagement pTable, DWORD_PTR dwIoBase);
-
-BOOL KeybGetKey(
- PSKeyManagement pTable,
- PBYTE pbyBSSID,
- DWORD dwKeyIndex,
- PSKeyItem *pKey
- );
-
-BOOL KeybSetKey(
- PSKeyManagement pTable,
- PBYTE pbyBSSID,
- DWORD dwKeyIndex,
- ULONG uKeyLength,
- PQWORD pKeyRSC,
- PBYTE pbyKey,
- BYTE byKeyDecMode,
- DWORD_PTR dwIoBase,
- BYTE byLocalID
- );
-
-BOOL KeybSetDefaultKey(
- PSKeyManagement pTable,
- DWORD dwKeyIndex,
- ULONG uKeyLength,
- PQWORD pKeyRSC,
- PBYTE pbyKey,
- BYTE byKeyDecMode,
- DWORD_PTR dwIoBase,
- BYTE byLocalID
- );
-
-BOOL KeybRemoveKey(
- PSKeyManagement pTable,
- PBYTE pbyBSSID,
- DWORD dwKeyIndex,
- DWORD_PTR dwIoBase
- );
-
-BOOL KeybGetTransmitKey(
- PSKeyManagement pTable,
- PBYTE pbyBSSID,
- DWORD dwKeyType,
- PSKeyItem *pKey
- );
-
-BOOL KeybCheckPairewiseKey(
- PSKeyManagement pTable,
- PSKeyItem *pKey
- );
-
-BOOL KeybRemoveAllKey(
- PSKeyManagement pTable,
- PBYTE pbyBSSID,
- DWORD_PTR dwIoBase
- );
+void KeyvInitTable(PSKeyManagement pTable, unsigned long dwIoBase);
+
+bool KeybGetKey(
+ PSKeyManagement pTable,
+ unsigned char *pbyBSSID,
+ unsigned long dwKeyIndex,
+ PSKeyItem *pKey
+);
+
+bool KeybSetKey(
+ PSKeyManagement pTable,
+ unsigned char *pbyBSSID,
+ unsigned long dwKeyIndex,
+ unsigned long uKeyLength,
+ PQWORD pKeyRSC,
+ unsigned char *pbyKey,
+ unsigned char byKeyDecMode,
+ unsigned long dwIoBase,
+ unsigned char byLocalID
+);
+
+bool KeybSetDefaultKey(
+ PSKeyManagement pTable,
+ unsigned long dwKeyIndex,
+ unsigned long uKeyLength,
+ PQWORD pKeyRSC,
+ unsigned char *pbyKey,
+ unsigned char byKeyDecMode,
+ unsigned long dwIoBase,
+ unsigned char byLocalID
+);
+
+bool KeybRemoveKey(
+ PSKeyManagement pTable,
+ unsigned char *pbyBSSID,
+ unsigned long dwKeyIndex,
+ unsigned long dwIoBase
+);
+
+bool KeybGetTransmitKey(
+ PSKeyManagement pTable,
+ unsigned char *pbyBSSID,
+ unsigned long dwKeyType,
+ PSKeyItem *pKey
+);
+
+bool KeybCheckPairewiseKey(
+ PSKeyManagement pTable,
+ PSKeyItem *pKey
+);
+
+bool KeybRemoveAllKey(
+ PSKeyManagement pTable,
+ unsigned char *pbyBSSID,
+ unsigned long dwIoBase
+);
void KeyvRemoveWEPKey(
- PSKeyManagement pTable,
- DWORD dwKeyIndex,
- DWORD_PTR dwIoBase
- );
+ PSKeyManagement pTable,
+ unsigned long dwKeyIndex,
+ unsigned long dwIoBase
+);
void KeyvRemoveAllWEPKey(
- PSKeyManagement pTable,
- DWORD_PTR dwIoBase
- );
-
-BOOL KeybSetAllGroupKey (
- PSKeyManagement pTable,
- DWORD dwKeyIndex,
- ULONG uKeyLength,
- PQWORD pKeyRSC,
- PBYTE pbyKey,
- BYTE byKeyDecMode,
- DWORD_PTR dwIoBase,
- BYTE byLocalID
- );
+ PSKeyManagement pTable,
+ unsigned long dwIoBase
+);
+
+bool KeybSetAllGroupKey(
+ PSKeyManagement pTable,
+ unsigned long dwKeyIndex,
+ unsigned long uKeyLength,
+ PQWORD pKeyRSC,
+ unsigned char *pbyKey,
+ unsigned char byKeyDecMode,
+ unsigned long dwIoBase,
+ unsigned char byLocalID
+);
#endif // __KEY_H__
-