~ubuntu-branches/ubuntu/quantal/linux-linaro-mx51/quantal

« back to all changes in this revision

Viewing changes to ubuntu/rtl8192se/rtllib/wapi.h

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-3o58a3c1bj7x00rs
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef __INC_WAPI_H
2
 
#define __INC_WAPI_H
3
 
 
4
 
#include <linux/kernel.h>
5
 
#include <linux/list.h>
6
 
#include "rtl819x_Qos.h"
7
 
 
8
 
/* WAPI trace debug */
9
 
extern u32 wapi_debug_component;
10
 
 
11
 
#define WAPI_TRACE(component, x, args...) \
12
 
do { if(wapi_debug_component & (component)) \
13
 
        printk(KERN_DEBUG "WAPI" ":" x "" , \
14
 
               ##args);\
15
 
}while(0);
16
 
 
17
 
#define WAPI_DATA(component, x, buf, len) \
18
 
do { if(wapi_debug_component & (component)){ \
19
 
        printk("%s:\n", x);\
20
 
        dump_buf((buf), (len));}\
21
 
}while(0);
22
 
 
23
 
enum WAPI_DEBUG {
24
 
        WAPI_INIT                               =BIT0,
25
 
        WAPI_API                                = BIT1,  
26
 
        WAPI_TX                         = BIT2,  
27
 
        WAPI_RX                         = BIT3,
28
 
        WAPI_ERR                                = BIT31
29
 
};
30
 
 
31
 
#define                 WAPI_MAX_BKID_NUM                               64
32
 
#define                 WAPI_MAX_STAINFO_NUM                    64
33
 
typedef struct  _RT_WAPI_BKID
34
 
{
35
 
        struct list_head        list;
36
 
        u8                              bkid[16];
37
 
}RT_WAPI_BKID,*PRT_WAPI_BKID;
38
 
 
39
 
typedef struct  _RT_WAPI_KEY
40
 
{
41
 
        u8                      dataKey[16];
42
 
        u8                      micKey[16];
43
 
        u8                      keyId;
44
 
        bool                    bSet;
45
 
        bool             bTxEnable;
46
 
}RT_WAPI_KEY,*PRT_WAPI_KEY;
47
 
 
48
 
typedef enum _RT_WAPI_PACKET_TYPE
49
 
{
50
 
        WAPI_NONE = 0,
51
 
        WAPI_PREAUTHENTICATE=1,
52
 
        WAPI_STAKEY_REQUEST=2,
53
 
        WAPI_AUTHENTICATE_ACTIVE=3,
54
 
        WAPI_ACCESS_AUTHENTICATE_REQUEST=4,
55
 
        WAPI_ACCESS_AUTHENTICATE_RESPONSE=5,
56
 
        WAPI_CERTIFICATE_AUTHENTICATE_REQUEST=6,
57
 
        WAPI_CERTIFICATE_AUTHENTICATE_RESPONSE=7,
58
 
        WAPI_USK_REQUEST=8,
59
 
        WAPI_USK_RESPONSE=9,
60
 
        WAPI_USK_CONFIRM=10,
61
 
        WAPI_MSK_NOTIFICATION=11,
62
 
        WAPI_MSK_RESPONSE=12
63
 
}RT_WAPI_PACKET_TYPE;
64
 
 
65
 
typedef struct _RT_CACHE_INFO {
66
 
        u8      cache_buffer[2000];
67
 
        u16     cache_buffer_len;
68
 
        u8 saddr[6];
69
 
        bool bAuthenticator;
70
 
        u16     recvSeq;
71
 
        u8      lastFragNum;
72
 
        struct list_head list;
73
 
}RT_CACHE_INFO, *PRT_CACHE_INFO;
74
 
 
75
 
typedef struct  _RT_WAPI_STA_INFO
76
 
{
77
 
        struct list_head                list;
78
 
        u8                                      PeerMacAddr[6]; 
79
 
        RT_WAPI_KEY                   wapiUsk;
80
 
        RT_WAPI_KEY                   wapiUskUpdate;
81
 
        RT_WAPI_KEY                   wapiMsk;
82
 
        RT_WAPI_KEY                   wapiMskUpdate;    
83
 
        u8                                      lastRxUnicastPN[16];
84
 
        u8                                      lastTxUnicastPN[16];
85
 
        u8                                      lastRxMulticastPN[16];
86
 
        u8                                      lastRxUnicastPNBEQueue[16];
87
 
        u8                                      lastRxUnicastPNBKQueue[16];
88
 
        u8                                      lastRxUnicastPNVIQueue[16];
89
 
        u8                                      lastRxUnicastPNVOQueue[16];
90
 
        bool                                    bSetkeyOk;
91
 
        bool                                    bAuthenticateInProgress;
92
 
        bool                                    bAuthenticatorInUpdata;
93
 
}RT_WAPI_STA_INFO,*PRT_WAPI_STA_INFO;
94
 
 
95
 
typedef struct _RT_WAPI_T
96
 
{
97
 
        u8              assoReqWapiIE[256];
98
 
        u8              assoReqWapiIELength;
99
 
        u8              assoRspWapiIE[256];
100
 
        u8              assoRspWapiIELength;
101
 
        u8              sendbeaconWapiIE[256];
102
 
        u8              sendbeaconWapiIELength;
103
 
        RT_WAPI_BKID            wapiBKID[WAPI_MAX_BKID_NUM];
104
 
        struct list_head                wapiBKIDIdleList;
105
 
        struct list_head                wapiBKIDStoreList;
106
 
        RT_WAPI_KEY                   wapiTxMsk;
107
 
 
108
 
        u8                              wapiDestMacAddr[6];
109
 
        bool                            bAuthenticator;
110
 
        u8                              lastTxMulticastPN[16];
111
 
        RT_WAPI_STA_INFO        wapiSta[WAPI_MAX_STAINFO_NUM];
112
 
        struct list_head                wapiSTAIdleList;
113
 
        struct list_head                wapiSTAUsedList;
114
 
        bool                            bWapiEnable;
115
 
        bool                            bUpdateUsk;
116
 
        bool                            bUpdateMsk;
117
 
 
118
 
        u8                              wapiIE[256];
119
 
        u8                              wapiIELength;
120
 
        bool                            bWapiNotSetEncMacHeader;
121
 
        bool                            bWapiPSK;
122
 
        bool                            bFirstAuthentiateInProgress;
123
 
        u16                             wapiSeqnumAndFragNum;
124
 
        int extra_prefix_len;
125
 
        int extra_postfix_len;
126
 
}RT_WAPI_T,*PRT_WAPI_T;
127
 
 
128
 
typedef struct _WLAN_HEADER_WAPI_EXTENSION
129
 
{
130
 
    u8      KeyIdx;
131
 
    u8      Reserved;
132
 
    u8      PN[16];
133
 
} WLAN_HEADER_WAPI_EXTENSION, *PWLAN_HEADER_WAPI_EXTENSION;
134
 
 
135
 
#endif