summaryrefslogtreecommitdiff
path: root/network/wlan/WDI/HAL/HalCam.h
blob: 70069cac6ef9a6b715c2246b691ce37849cd35d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
#include "Mp_Precomp.h"


#define CAM_CONTENT_COUNT 			8
#define CAM_PAIRWISE_KEY_POSITION		4

//   0~3 											: Default Key 
//   4											: Default Port Station Key ( Pairwise key )
//   5~HALF_CAM_ENTRY - MAX_BT_ASOC_ENTRY_NUM 	: TDSL 
//	HALF_CAM_ENTRY ~ TOTAL_CAM_ENTRY-1 		: ExtAP( VWifi , XP-ExtAP and Win7/8 ExtAP )
//   CAM_EXTSTA_PAIRWISE_KEY_POSITION			: ExtSta key ( Pairwise key )
#define CAM_TDSL_START_INDEX					5

#define CFG_DEFAULT_KEY  	BIT5
#define CFG_VALID        		BIT15


//add for AP HW , CCW

u1Byte AP_CamAddOneEntry(
	PADAPTER     Adapter,
	u1Byte 			*pucMacAddr, 
	u4Byte 			ulKeyId, 
	u4Byte 			ulEncAlg, 
	u4Byte 			ulUseDK, 
	u1Byte 			*pucKey
);

u1Byte AP_Setkey(
	PADAPTER     Adapter,
	u1Byte 			*pucMacAddr, 
	u4Byte 			ulKeyId, 
	u4Byte 			ulEncAlg, 
	u4Byte 			ulUseDK, 
	u1Byte 			*pucKey);


u4Byte AP_FindFreeEntry(
	PADAPTER     Adapter,
	pu1Byte		Macaddr
	);

void AP_ClearAllKey(
	PADAPTER     Adapter);


void AP_RemoveKey(
	PADAPTER		Adapter,
	PRT_WLAN_STA	pSTA);

//Add for AP enc ,CCW
//======================
u1Byte CamAddOneEntry(
	PADAPTER     Adapter,
	u1Byte 			*pucMacAddr, 
	u4Byte 			ulKeyId, 
	u4Byte			ulEntryId,	
	u4Byte 			ulEncAlg, 
	u4Byte 			ulUseDK, 
	u1Byte 			*pucKey
);
int CamDeleteOneEntry(
		PADAPTER	Adapter,
		u1Byte 			*pucMacAddr, 
		u4Byte 			ulKeyId
);

void CAMtest(
	PADAPTER     	Adapter,
	u1Byte   			ucTestItem);

void test_cam(
	PADAPTER     Adapter);

//----------------------------------------
//Function declartion for internal usage of CAM.c
//----------------------------------------

u1Byte CAM_find_usable(
	PADAPTER     Adapter);

void CAM_program_entry(
	PADAPTER     	Adapter,
	u4Byte	 			iIndex, 
	u1Byte			*pucMacad,
	u1Byte			*pucKey128, 
	u2Byte 			usConfig);

void CAM_read_entry(
	PADAPTER     	Adapter,
	u4Byte	 			iIndex, 
	u1Byte			*pucMacad,
	u1Byte			*pucKey128, 
	u2Byte			*usConfig);

void CAM_read_mac_config(
		PADAPTER     	Adapter,
		u1Byte 			ucIndex, 
		u1Byte			*pucMacad, 
		u2Byte			*pusTempConfig);

void CAM_mark_invalid(
	PADAPTER     	Adapter,	
	u1Byte 			ucIndex);

void CAM_empty_entry(
	PADAPTER     	Adapter,	
	u1Byte 			ucIndex);

void CAM_read_entry(
	PADAPTER     	Adapter,
	u4Byte	 		index, 
	u1Byte			*macad,
	u1Byte			*key128, 
	u2Byte			*config);

void CAM_debug_print(
	u1Byte			*pucMac,
	u1Byte			*pucKey,
	u2Byte 			usConfig);
VOID
CamDumpAll(	PADAPTER     	Adapter);

VOID
CamDumpAllCallbackWorkItem(
	IN	PVOID		pContext);

VOID
CamResetAllEntry(PADAPTER Adapter);


VOID 
AP_CamRestoreAllEntry(
	PADAPTER Adapter);


VOID 
CamRestoreAllEntry(PADAPTER Adapter);


void build_cam(
	PADAPTER     	Adapter);

void loopcam(
	PADAPTER     	Adapter
);
void SingleCam(
	PADAPTER     	Adapter);

void build_16_cam(
	PADAPTER     	Adapter);

void  BurstTxCAM(void);
//----IF Emily
void CAM_Policy_Verify(void);


//vivi added for new cam search flow, 20091028.
u4Byte Sta_FindFreeEntry(
	PADAPTER	Adapter,
	pu1Byte		pMacAddr,
	u4Byte 		KeyIndex, 
	u4Byte 		ulEncAlg, 
	u1Byte 		*pucKey
);