Commit | Line | Data |
---|---|---|
4bd43f50 LR |
1 | /* |
2 | * Copyright (c) 2007-2008 Atheros Communications Inc. | |
3 | * | |
4 | * Permission to use, copy, modify, and/or distribute this software for any | |
5 | * purpose with or without fee is hereby granted, provided that the above | |
6 | * copyright notice and this permission notice appear in all copies. | |
7 | * | |
8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
15 | */ | |
16 | /* */ | |
17 | /* Module Name : func_extr.c */ | |
18 | /* */ | |
19 | /* Abstract */ | |
20 | /* This module contains function prototype. */ | |
21 | /* */ | |
22 | /* NOTES */ | |
23 | /* None */ | |
24 | /* */ | |
25 | /************************************************************************/ | |
26 | ||
27 | #ifndef _CFUNC_H | |
28 | #define _CFUNC_H | |
29 | ||
30 | #include "queue.h" | |
31 | ||
32 | /* amsdu.c */ | |
33 | void zfDeAmsdu(zdev_t* dev, zbuf_t* buf, u16_t vap, u8_t encryMode); | |
34 | ||
35 | /* cscanmgr.c */ | |
36 | void zfScanMgrInit(zdev_t* dev); | |
37 | u8_t zfScanMgrScanStart(zdev_t* dev, u8_t scanType); | |
38 | void zfScanMgrScanStop(zdev_t* dev, u8_t scanType); | |
39 | void zfScanMgrScanAck(zdev_t* dev); | |
40 | ||
41 | /* cpsmgr.c */ | |
42 | void zfPowerSavingMgrInit(zdev_t* dev); | |
43 | void zfPowerSavingMgrSetMode(zdev_t* dev, u8_t mode); | |
44 | void zfPowerSavingMgrMain(zdev_t* dev); | |
45 | void zfPowerSavingMgrWakeup(zdev_t* dev); | |
46 | u8_t zfPowerSavingMgrIsSleeping(zdev_t *dev); | |
47 | void zfPowerSavingMgrProcessBeacon(zdev_t* dev, zbuf_t* buf); | |
48 | void zfPowerSavingMgrAtimWinExpired(zdev_t* dev); | |
49 | void zfPowerSavingMgrConnectNotify(zdev_t *dev); | |
50 | void zfPowerSavingMgrPreTBTTInterrupt(zdev_t *dev); | |
51 | ||
52 | /* ccmd.c */ | |
53 | u16_t zfWlanEnable(zdev_t* dev); | |
54 | ||
55 | /* cfunc.c */ | |
56 | u8_t zfQueryOppositeRate(zdev_t* dev, u8_t dst_mac[6], u8_t frameType); | |
57 | void zfCopyToIntTxBuffer(zdev_t* dev, zbuf_t* buf, u8_t* src, | |
58 | u16_t offset, u16_t length); | |
59 | void zfCopyToRxBuffer(zdev_t* dev, zbuf_t* buf, u8_t* src, | |
60 | u16_t offset, u16_t length); | |
61 | void zfCopyFromIntTxBuffer(zdev_t* dev, zbuf_t* buf, u8_t* dst, | |
62 | u16_t offset, u16_t length); | |
63 | void zfCopyFromRxBuffer(zdev_t* dev, zbuf_t* buf, u8_t* dst, | |
64 | u16_t offset, u16_t length); | |
65 | void zfMemoryCopy(u8_t* dst, u8_t* src, u16_t length); | |
66 | void zfMemoryMove(u8_t* dst, u8_t* src, u16_t length); | |
67 | void zfZeroMemory(u8_t* va, u16_t length); | |
68 | u8_t zfMemoryIsEqual(u8_t* m1, u8_t* m2, u16_t length); | |
69 | u8_t zfRxBufferEqualToStr(zdev_t* dev, zbuf_t* buf, const u8_t* str, | |
70 | u16_t offset, u16_t length); | |
71 | void zfTxBufferCopy(zdev_t*dev, zbuf_t* dst, zbuf_t* src, | |
72 | u16_t dstOffset, u16_t srcOffset, u16_t length); | |
73 | void zfRxBufferCopy(zdev_t*dev, zbuf_t* dst, zbuf_t* src, | |
74 | u16_t dstOffset, u16_t srcOffset, u16_t length); | |
75 | ||
76 | void zfCollectHWTally(zdev_t*dev, u32_t* rsp, u8_t id); | |
77 | void zfTimerInit(zdev_t* dev); | |
78 | u16_t zfTimerSchedule(zdev_t* dev, u16_t event, u32_t tick); | |
79 | u16_t zfTimerCancel(zdev_t* dev, u16_t event); | |
80 | void zfTimerClear(zdev_t* dev); | |
81 | u16_t zfTimerCheckAndHandle(zdev_t* dev); | |
82 | void zfProcessEvent(zdev_t* dev, u16_t* eventArray, u8_t eventCount); | |
83 | ||
84 | void zfBssInfoCreate(zdev_t* dev); | |
85 | void zfBssInfoDestroy(zdev_t* dev); | |
86 | ||
87 | struct zsBssInfo* zfBssInfoAllocate(zdev_t* dev); | |
88 | void zfBssInfoFree(zdev_t* dev, struct zsBssInfo* pBssInfo); | |
89 | void zfBssInfoReorderList(zdev_t* dev); | |
90 | void zfBssInfoInsertToList(zdev_t* dev, struct zsBssInfo* pBssInfo); | |
91 | void zfBssInfoRemoveFromList(zdev_t* dev, struct zsBssInfo* pBssInfo); | |
92 | void zfBssInfoRefresh(zdev_t* dev, u16_t mode); | |
93 | void zfCoreSetFrequencyComplete(zdev_t* dev); | |
94 | void zfCoreSetFrequency(zdev_t* dev, u16_t frequency); | |
95 | void zfCoreSetFrequencyV2(zdev_t* dev, u16_t frequency, | |
96 | zfpFreqChangeCompleteCb cb); | |
97 | void zfCoreSetFrequencyEx(zdev_t* dev, u16_t frequency, u8_t bw40, | |
98 | u8_t extOffset, zfpFreqChangeCompleteCb cb); | |
99 | void zfCoreSetFrequencyExV2(zdev_t* dev, u16_t frequency, u8_t bw40, | |
100 | u8_t extOffset, zfpFreqChangeCompleteCb cb, u8_t forceSetFreq); | |
101 | void zfReSetCurrentFrequency(zdev_t* dev); | |
102 | u32_t zfCoreSetKey(zdev_t* dev, u8_t user, u8_t keyId, u8_t type, | |
103 | u16_t* mac, u32_t* key); | |
104 | void zfCoreSetKeyComplete(zdev_t* dev); | |
105 | void zfCoreReinit(zdev_t* dev); | |
106 | void zfCoreMacAddressNotify(zdev_t* dev, u8_t *addr); | |
107 | void zfCoreSetIsoName(zdev_t* dev, u8_t* isoName); | |
108 | void zfGenerateRandomBSSID(zdev_t* dev, u8_t *MACAddr, u8_t *BSSID); | |
109 | void zfCoreHalInitComplete(zdev_t* dev); | |
110 | ||
111 | u16_t zfFindCleanFrequency(zdev_t* dev, u32_t adhocMode); | |
112 | u16_t zfFindMinimumUtilizationChannelIndex(zdev_t* dev, u16_t* array, u16_t count); | |
113 | u8_t zfCompareWithBssid(zdev_t* dev, u16_t* bssid); | |
114 | ||
115 | /* chb.c */ | |
116 | void zfDumpBssList(zdev_t* dev); | |
117 | ||
118 | ||
119 | u16_t zfIssueCmd(zdev_t* dev, u32_t* cmd, u16_t cmdLen, u16_t src, u8_t* buf); | |
120 | ||
121 | ||
122 | /* cic.c */ | |
123 | void zfUpdateBssid(zdev_t* dev, u8_t* bssid); | |
124 | void zfResetSupportRate(zdev_t* dev, u8_t type); | |
125 | void zfUpdateSupportRate(zdev_t* dev, u8_t* rateArray); | |
126 | u8_t zfIsGOnlyMode(zdev_t* dev, u16_t frequency, u8_t* rateArray); | |
127 | void zfGatherBMode(zdev_t* dev, u8_t* rateArray, u8_t* extrateArray); | |
128 | u8_t zfPSDeviceSleep(zdev_t* dev); | |
129 | u16_t zfGetRandomNumber(zdev_t* dev, u16_t initValue); | |
130 | void zfCoreEvent(zdev_t* dev, u16_t event, u8_t* rsp); | |
131 | void zfBeaconCfgInterrupt(zdev_t* dev, u8_t* rsp); | |
132 | void zfEndOfAtimWindowInterrupt(zdev_t* dev); | |
133 | ||
134 | /* cinit.c */ | |
135 | u16_t zfTxGenWlanHeader(zdev_t* dev, zbuf_t* buf, u16_t* header, u16_t seq, | |
136 | u8_t flag, u16_t plusLen, u16_t minusLen, u16_t port, | |
137 | u16_t* da, u16_t* sa, u8_t up, u16_t *micLen, | |
138 | u16_t* snap, u16_t snapLen, struct aggControl *aggControl); | |
139 | u16_t zfTxGenMmHeader(zdev_t* dev, u8_t frameType, u16_t* dst, | |
140 | u16_t* header, u16_t len, zbuf_t* buf, u16_t vap, u8_t encrypt); | |
141 | void zfInitMacApMode(zdev_t* dev); | |
142 | u16_t zfChGetNextChannel(zdev_t* dev, u16_t frequency, u8_t* pbPassive); | |
143 | u16_t zfChGetFirstChannel(zdev_t* dev, u8_t* pbPassive); | |
144 | u16_t zfChGetFirst2GhzChannel(zdev_t* dev); | |
145 | u16_t zfChGetFirst5GhzChannel(zdev_t* dev); | |
146 | u16_t zfChGetLastChannel(zdev_t* dev, u8_t* pbPassive); | |
147 | u16_t zfChGetLast5GhzChannel(zdev_t* dev); | |
148 | u16_t zfChNumToFreq(zdev_t* dev, u8_t ch, u8_t freqBand); | |
149 | u8_t zfChFreqToNum(u16_t freq, u8_t* bIs5GBand); | |
150 | ||
151 | /* cmm.c */ | |
152 | void zfProcessManagement(zdev_t* dev, zbuf_t* buf, struct zsAdditionInfo* AddInfo); //CWYang(m) | |
153 | void zfSendMmFrame(zdev_t* dev, u8_t frameType, u16_t* dst, | |
154 | u32_t p1, u32_t p2, u32_t p3); | |
155 | u16_t zfFindElement(zdev_t* dev, zbuf_t* buf, u8_t eid); | |
156 | u16_t zfFindWifiElement(zdev_t* dev, zbuf_t* buf, u8_t type, u8_t subtype); | |
157 | u16_t zfFindSuperGElement(zdev_t* dev, zbuf_t* buf, u8_t type); | |
158 | u16_t zfFindXRElement(zdev_t* dev, zbuf_t* buf, u8_t type); | |
159 | u16_t zfRemoveElement(zdev_t* dev, u8_t* buf, u16_t size, u8_t eid); | |
160 | u16_t zfUpdateElement(zdev_t* dev, u8_t* buf, u16_t size, u8_t* updateeid); | |
161 | void zfProcessProbeReq(zdev_t* dev, zbuf_t* buf, u16_t* src); | |
162 | void zfProcessProbeRsp(zdev_t* dev, zbuf_t* buf, struct zsAdditionInfo* AddInfo); | |
163 | u16_t zfSendProbeReq(zdev_t* dev, zbuf_t* buf, u16_t offset, u8_t bWithSSID); | |
164 | u16_t zfMmAddIeSupportRate(zdev_t* dev, zbuf_t* buf, | |
165 | u16_t offset, u8_t eid, u8_t rateSet); | |
166 | u16_t zfMmAddIeDs(zdev_t* dev, zbuf_t* buf, u16_t offset); | |
167 | u16_t zfMmAddIeErp(zdev_t* dev, zbuf_t* buf, u16_t offset); | |
168 | void zfUpdateDefaultQosParameter(zdev_t* dev, u8_t mode); | |
169 | u16_t zfMmAddIeWpa(zdev_t* dev, zbuf_t* buf, u16_t offset, u16_t apId); | |
170 | u16_t zfMmAddHTCapability(zdev_t* dev, zbuf_t* buf, u16_t offset); //CWYang(+) | |
171 | u16_t zfMmAddPreNHTCapability(zdev_t* dev, zbuf_t* buf, u16_t offset); | |
172 | u16_t zfMmAddExtendedHTCapability(zdev_t* dev, zbuf_t* buf, u16_t offset); //CWYang(+) | |
173 | u16_t zfFindATHExtCap(zdev_t* dev, zbuf_t* buf, u8_t type, u8_t subtype); | |
174 | u16_t zfFindBrdcmMrvlRlnkExtCap(zdev_t* dev, zbuf_t* buf); | |
175 | u16_t zfFindMarvelExtCap(zdev_t* dev, zbuf_t* buf); | |
176 | u16_t zfFindBroadcomExtCap(zdev_t* dev, zbuf_t* buf); | |
177 | u16_t zfFindRlnkExtCap(zdev_t* dev, zbuf_t* buf); | |
178 | ||
179 | /* cmmap.c */ | |
180 | void zfMmApTimeTick(zdev_t* dev); | |
181 | void zfApAgingSta(zdev_t* dev); | |
182 | u16_t zfApAddSta(zdev_t* dev, u16_t* addr, u16_t state, u16_t apId, u8_t type, | |
183 | u8_t qosType, u8_t qosInfo); | |
184 | void zfApProtctionMonitor(zdev_t* dev); | |
185 | void zfApProcessBeacon(zdev_t* dev, zbuf_t* buf); | |
186 | void zfApProcessAuth(zdev_t* dev, zbuf_t* buf, u16_t* src, u16_t apId); | |
187 | void zfApProcessAsocReq(zdev_t* dev, zbuf_t* buf, u16_t* src, u16_t apId); | |
188 | void zfApProcessAsocRsp(zdev_t* dev, zbuf_t* buf); | |
189 | void zfApProcessDeauth(zdev_t* dev, zbuf_t* buf, u16_t* src, u16_t apId); | |
190 | void zfApProcessDisasoc(zdev_t* dev, zbuf_t* buf, u16_t* src, u16_t apId); | |
191 | void zfApProcessProbeRsp(zdev_t* dev, zbuf_t* buf, struct zsAdditionInfo* AddInfo); | |
192 | void zfApStoreAsocReqIe(zdev_t* dev, zbuf_t* buf, u16_t aid); | |
193 | u16_t zfApAddIeSsid(zdev_t* dev, zbuf_t* buf, u16_t offset, u16_t vap); | |
194 | void zfApSendBeacon(zdev_t* dev); | |
195 | u16_t zfApGetSTAInfo(zdev_t* dev, u16_t* addr, u16_t* state, u8_t* vap); | |
196 | u16_t zfIntrabssForward(zdev_t* dev, zbuf_t* buf, u8_t srcVap); | |
197 | u16_t zfApBufferPsFrame(zdev_t* dev, zbuf_t* buf, u16_t port); | |
198 | void zfApInitStaTbl(zdev_t* dev); | |
199 | void zfApGetStaTxRateAndQosType(zdev_t* dev, u16_t* addr, u32_t* phyCtrl, | |
200 | u8_t* qosType, u16_t* rcProbingFlag); | |
201 | void zfApGetStaQosType(zdev_t* dev, u16_t* addr, u8_t* qosType); | |
202 | void zfApSetStaTxRate(zdev_t* dev, u16_t* addr, u32_t phyCtrl); | |
203 | struct zsMicVar* zfApGetRxMicKey(zdev_t* dev, zbuf_t* buf); | |
204 | struct zsMicVar* zfApGetTxMicKey(zdev_t* dev, zbuf_t* buf, u8_t* qosType); | |
205 | u16_t zfApAddIeWmePara(zdev_t* dev, zbuf_t* buf, u16_t offset, u16_t vap); | |
206 | u16_t zfApUpdatePsBit(zdev_t* dev, zbuf_t* buf, u8_t* vap, u8_t* uapsdTrig); | |
207 | void zfApProcessPsPoll(zdev_t* dev, zbuf_t* buf); | |
208 | u16_t zfApFindSta(zdev_t* dev, u16_t* addr); | |
209 | void zfApGetStaEncryType(zdev_t* dev, u16_t* addr, u8_t* encryType); | |
210 | void zfApGetStaWpaIv(zdev_t* dev, u16_t* addr, u16_t* iv16, u32_t* iv32); | |
211 | void zfApSetStaWpaIv(zdev_t* dev, u16_t* addr, u16_t iv16, u32_t iv32); | |
212 | void zfApClearStaKey(zdev_t* dev, u16_t* addr); | |
213 | #ifdef ZM_ENABLE_CENC | |
214 | void zfApGetStaCencIvAndKeyIdx(zdev_t* dev, u16_t* addr, u32_t *iv, | |
215 | u8_t *keyIdx); | |
216 | void zfApSetStaCencIv(zdev_t* dev, u16_t* addr, u32_t *iv); | |
217 | #endif //ZM_ENABLE_CENC | |
218 | void zfApSetProtectionMode(zdev_t* dev, u16_t mode); | |
219 | void zfApFlushBufferedPsFrame(zdev_t* dev); | |
220 | void zfApSendFailure(zdev_t* dev, u8_t* addr); | |
221 | u8_t zfApRemoveFromPsQueue(zdev_t* dev, u16_t id, u16_t* src); | |
222 | void zfApProcessAction(zdev_t* dev, zbuf_t* buf); | |
223 | /* cmmsta.c */ | |
224 | void zfMmStaTimeTick(zdev_t* dev); | |
225 | void zfReWriteBeaconStartAddress(zdev_t* dev); // Mxzeng | |
226 | void zfStaProcessBeacon(zdev_t* dev, zbuf_t* buf, struct zsAdditionInfo* AddInfo); //CWYang(m) | |
227 | void zfStaProcessAuth(zdev_t* dev, zbuf_t* buf, u16_t* src, u16_t apId); | |
228 | void zfStaProcessAsocReq(zdev_t* dev, zbuf_t* buf, u16_t* src, u16_t apId); | |
229 | void zfStaProcessAsocRsp(zdev_t* dev, zbuf_t* buf); | |
230 | void zfStaProcessDeauth(zdev_t* dev, zbuf_t* buf); | |
231 | void zfStaProcessDisasoc(zdev_t* dev, zbuf_t* buf); | |
232 | void zfStaProcessProbeRsp(zdev_t* dev, zbuf_t* buf, struct zsAdditionInfo* AddInfo); | |
233 | void zfStaProcessAtim(zdev_t* dev, zbuf_t* buf); | |
234 | void zfStaStoreAsocRspIe(zdev_t* dev, zbuf_t* buf); | |
235 | void zfStaChannelManagement(zdev_t* dev, u8_t scan); | |
236 | void zfIbssConnectNetwork(zdev_t* dev); | |
237 | void zfInfraConnectNetwork(zdev_t* dev); | |
238 | u8_t zfCheckAuthentication(zdev_t* dev, struct zsBssInfo* pBssInfo); | |
239 | u8_t zfChangeAdapterState(zdev_t* dev, u8_t newState); | |
240 | u16_t zfStaAddIeSsid(zdev_t* dev, zbuf_t* buf, u16_t offset); | |
241 | u16_t zfStaAddIeWpaRsn(zdev_t* dev, zbuf_t* buf, u16_t offset, u8_t frameType); | |
242 | u16_t zfStaAddIeIbss(zdev_t* dev, zbuf_t* buf, u16_t offset); | |
243 | void zfStaStartConnect(zdev_t* dev, u8_t bIsSharedKey); | |
244 | u8_t zfStaIsConnected(zdev_t* dev); | |
245 | u8_t zfStaIsConnecting(zdev_t* dev); | |
246 | u8_t zfStaIsDisconnect(zdev_t* dev); | |
247 | void zfStaSendBeacon(zdev_t* dev); | |
248 | void zfSendNullData(zdev_t* dev, u8_t type); | |
249 | void zfSendPSPoll(zdev_t* dev); | |
250 | void zfSendBA(zdev_t* dev, u16_t start_seq, u8_t *bitmap); | |
251 | void zdRateInfoCountTx(zdev_t* dev, u16_t* macAddr); | |
252 | struct zsMicVar* zfStaGetRxMicKey(zdev_t* dev, zbuf_t* buf); | |
253 | struct zsMicVar* zfStaGetTxMicKey(zdev_t* dev, zbuf_t* buf); | |
254 | u16_t zfStaRxValidateFrame(zdev_t* dev, zbuf_t* buf); | |
255 | void zfStaMicFailureHandling(zdev_t* dev, zbuf_t* buf); | |
256 | u8_t zfStaBlockWlanScan(zdev_t* dev); | |
257 | void zfStaIbssPSCheckState(zdev_t* dev, zbuf_t* buf); | |
258 | u8_t zfStaIbssPSQueueData(zdev_t* dev, zbuf_t* buf); | |
259 | void zfStaIbssPSSend(zdev_t* dev); | |
260 | void zfStaResetStatus(zdev_t* dev, u8_t bInit); | |
261 | u16_t zfStaAddIeWmeInfo(zdev_t* dev, zbuf_t* buf, u16_t offset, u8_t qosInfo); | |
262 | void zfInitPartnerNotifyEvent(zdev_t* dev, zbuf_t* buf, struct zsPartnerNotifyEvent *event); | |
263 | void zfStaInitOppositeInfo(zdev_t* dev); | |
264 | void zfStaIbssMonitoring(zdev_t* dev, u8_t reset); | |
265 | struct zsBssInfo* zfStaFindBssInfo(zdev_t* dev, zbuf_t* buf, struct zsWlanProbeRspFrameHeader *pProbeRspHeader); | |
266 | u8_t zfStaInitBssInfo(zdev_t* dev, zbuf_t* buf, | |
267 | struct zsWlanProbeRspFrameHeader *pProbeRspHeader, | |
268 | struct zsBssInfo* pBssInfo, struct zsAdditionInfo* AddInfo, u8_t type); | |
269 | s8_t zfStaFindFreeOpposite(zdev_t* dev, u16_t *sa, int *pFoundIdx); | |
270 | s8_t zfStaFindOppositeByMACAddr(zdev_t* dev, u16_t *sa, u8_t *pFoundIdx); | |
271 | void zfStaRefreshBlockList(zdev_t* dev, u16_t flushFlag); | |
272 | void zfStaConnectFail(zdev_t* dev, u16_t reason, u16_t* bssid, u8_t weight); | |
273 | void zfStaGetTxRate(zdev_t* dev, u16_t* macAddr, u32_t* phyCtrl, | |
274 | u16_t* rcProbingFlag); | |
275 | u16_t zfStaProcessAction(zdev_t* dev, zbuf_t* buf); | |
276 | struct zsTkipSeed* zfStaGetRxSeed(zdev_t* dev, zbuf_t* buf); | |
277 | #ifdef ZM_ENABLE_CENC | |
278 | /* CENC */ | |
279 | u16_t zfStaAddIeCenc(zdev_t* dev, zbuf_t* buf, u16_t offset); | |
280 | #endif //ZM_ENABLE_CENC | |
281 | void zfStaEnableSWEncryption(zdev_t *dev, u8_t value); | |
282 | void zfStaDisableSWEncryption(zdev_t *dev); | |
283 | u16_t zfComputeBssInfoWeightValue(zdev_t *dev, u8_t isBMode, u8_t isHT, u8_t isHT40, u8_t signalStrength); | |
284 | u16_t zfStaAddIbssAdditionalIE(zdev_t* dev, zbuf_t* buf, u16_t offset); | |
285 | ||
286 | /* ctkip.c */ | |
287 | void zfTkipInit(u8_t* key, u8_t* ta, struct zsTkipSeed* pSeed, u8_t* initIv); | |
288 | void zfMicSetKey(u8_t* key, struct zsMicVar* pMic); | |
289 | void zfMicAppendByte(u8_t b, struct zsMicVar* pMic); | |
290 | void zfMicClear(struct zsMicVar* pMic); | |
291 | void zfMicAppendTxBuf(zdev_t* dev, zbuf_t* buf, u8_t* da, u8_t* sa, | |
292 | u16_t removeLen, u8_t* mic); | |
293 | u8_t zfMicRxVerify(zdev_t* dev, zbuf_t* buf); | |
294 | void zfMicGetMic(u8_t* dst, struct zsMicVar* pMic); | |
295 | void zfCalTxMic(zdev_t *dev, zbuf_t *buf, u8_t *snap, u16_t snapLen, u16_t offset, u16_t *da, u16_t *sa, u8_t up, u8_t *mic); | |
296 | void zfTKIPEncrypt(zdev_t *dev, zbuf_t *buf, u8_t *snap, u16_t snapLen, u16_t offset, u8_t keyLen, u8_t* key, u32_t* icv); | |
297 | u16_t zfTKIPDecrypt(zdev_t *dev, zbuf_t *buf, u16_t offset, u8_t keyLen, u8_t* key); | |
298 | void zfTkipGetseeds(u16_t iv16, u8_t *RC4Key, struct zsTkipSeed *Seed); | |
299 | u8_t zfTkipPhase1KeyMix(u32_t iv32, struct zsTkipSeed* pSeed); | |
300 | u8_t zfTkipPhase2KeyMix(u16_t iv16, struct zsTkipSeed* pSeed); | |
301 | void zfWEPEncrypt(zdev_t *dev, zbuf_t *buf, u8_t *snap, u16_t snapLen, u16_t offset, u8_t keyLen, u8_t* WepKey, u8_t *iv); | |
302 | u16_t zfWEPDecrypt(zdev_t *dev, zbuf_t *buf, u16_t offset, u8_t keyLen, u8_t* WepKey, u8_t *iv); | |
303 | ||
304 | /* ctxrx.c */ | |
305 | u16_t zfSend80211Frame(zdev_t* dev, zbuf_t* buf); | |
306 | void zfIsrPciTxComp(zdev_t* dev); | |
307 | void zfTxPciDmaStart(zdev_t* dev); | |
308 | u16_t zfTxPortControl(zdev_t* dev, zbuf_t* buf, u16_t port); | |
309 | u16_t zfTxSendEth(zdev_t* dev, zbuf_t* buf, u16_t port, | |
310 | u16_t bufType, u16_t flag); | |
311 | u16_t zfTxGenWlanTail(zdev_t* dev, zbuf_t* buf, u16_t* snap, u16_t snaplen, | |
312 | u16_t* mic); | |
313 | u16_t zfTxGenWlanSnap(zdev_t* dev, zbuf_t* buf, u16_t* snap, u16_t* snaplen); | |
314 | void zfTxGetIpTosAndFrag(zdev_t* dev, zbuf_t* buf, u8_t* up, u16_t* fragOff); | |
315 | u16_t zfPutVtxq(zdev_t* dev, zbuf_t* buf); | |
316 | void zfPushVtxq(zdev_t* dev); | |
317 | u8_t zfIsVtxqEmpty(zdev_t* dev); | |
318 | u16_t zfGetSeqCtrl(zdev_t* dev, zbuf_t* buf, u16_t offset); | |
319 | u8_t zfGetFragNo(zdev_t* dev, zbuf_t* buf); | |
320 | void zfShowRxEAPOL(zdev_t* dev, zbuf_t* buf, u16_t offset); | |
321 | void zfShowTxEAPOL(zdev_t* dev, zbuf_t* buf, u16_t offset); | |
322 | void zfCoreRecv(zdev_t* dev, zbuf_t* buf, struct zsAdditionInfo* addInfo); | |
323 | u16_t zfPutVmmq(zdev_t* dev, zbuf_t* buf); | |
324 | void zfFlushVtxq(zdev_t* dev); | |
325 | void zfAgingDefragList(zdev_t* dev, u16_t flushFlag); | |
326 | ||
327 | void zfLed100msCtrl(zdev_t* dev); | |
328 | void zf80211FrameSend(zdev_t* dev, zbuf_t* buf, u16_t* header, u16_t snapLen, | |
329 | u16_t* da, u16_t* sa, u8_t up, u16_t headerLen, u16_t* snap, | |
330 | u16_t* tail, u16_t tailLen, u16_t offset, u16_t bufType, | |
331 | u8_t ac, u8_t keyIdx); | |
332 | void zfCheckIsRIFSFrame(zdev_t* dev, zbuf_t* buf, u16_t frameSubType); | |
333 | ||
334 | /* queue.c */ | |
335 | struct zsQueue* zfQueueCreate(zdev_t* dev, u16_t size); | |
336 | void zfQueueDestroy(zdev_t* dev, struct zsQueue* q); | |
337 | u16_t zfQueuePutNcs(zdev_t* dev, struct zsQueue* q, zbuf_t* buf, u32_t tick); | |
338 | u16_t zfQueuePut(zdev_t* dev, struct zsQueue* q, zbuf_t* buf, u32_t tick); | |
339 | zbuf_t* zfQueueGet(zdev_t* dev, struct zsQueue* q); | |
340 | zbuf_t* zfQueueGetWithMac(zdev_t* dev, struct zsQueue* q, u8_t* addr, u8_t* mb); | |
341 | void zfQueueFlush(zdev_t* dev, struct zsQueue* q); | |
342 | void zfQueueAge(zdev_t* dev, struct zsQueue* q, u32_t tick, u32_t msAge); | |
343 | void zfQueueGenerateUapsdTim(zdev_t* dev, struct zsQueue* q, | |
344 | u8_t* uniBitMap, u16_t* highestByte); | |
345 | ||
346 | /* hpmain.c */ | |
347 | u16_t zfHpInit(zdev_t* dev, u32_t frequency); | |
348 | u16_t zfHpRelease(zdev_t* dev); | |
349 | void zfHpSetFrequencyEx(zdev_t* dev, u32_t frequency, u8_t bw40, | |
350 | u8_t extOffset, u8_t initRF); | |
351 | u16_t zfHpStartRecv(zdev_t* dev); | |
352 | u16_t zfHpStopRecv(zdev_t* dev); | |
353 | u16_t zfHpResetKeyCache(zdev_t* dev); | |
354 | u16_t zfHpSetApStaMode(zdev_t* dev, u8_t mode); | |
355 | u16_t zfHpSetBssid(zdev_t* dev, u8_t* bssid); | |
356 | u16_t zfHpSetSnifferMode(zdev_t* dev, u16_t on); | |
357 | u8_t zfHpUpdateQosParameter(zdev_t* dev, u16_t* cwminTbl, u16_t* cwmaxTbl, | |
358 | u16_t* aifsTbl, u16_t* txopTbl); | |
359 | void zfHpSetAtimWindow(zdev_t* dev, u16_t atimWin); | |
360 | void zfHpEnableBeacon(zdev_t* dev, u16_t mode, u16_t bcnInterval, u16_t dtim, u8_t enableAtim); | |
361 | void zfHpDisableBeacon(zdev_t* dev); | |
362 | void zfHpSetBasicRateSet(zdev_t* dev, u16_t bRateBasic, u16_t gRateBasic); | |
363 | void zfHpSetRTSCTSRate(zdev_t* dev, u32_t rate); | |
364 | void zfHpSetMacAddress(zdev_t* dev, u16_t* macAddr, u16_t macAddrId); | |
365 | u32_t zfHpGetMacAddress(zdev_t* dev); | |
366 | u32_t zfHpGetTransmitPower(zdev_t* dev); | |
367 | void zfHpSetMulticastList(zdev_t* dev, u8_t size, u8_t* pList, u8_t bAllMulticast); | |
368 | ||
369 | u16_t zfHpRemoveKey(zdev_t* dev, u16_t user); | |
370 | u32_t zfHpSetKey(zdev_t* dev, u8_t user, u8_t keyId, u8_t type, | |
371 | u16_t* mac, u32_t* key); | |
372 | //u32_t zfHpSetStaPairwiseKey(zdev_t* dev, u16_t* apMacAddr, u8_t type, | |
373 | // u32_t* key, u32_t* micKey); | |
374 | //u32_t zfHpSetStaGroupKey(zdev_t* dev, u16_t* apMacAddr, u8_t type, | |
375 | // u32_t* key, u32_t* micKey); | |
376 | u32_t zfHpSetApPairwiseKey(zdev_t* dev, u16_t* staMacAddr, u8_t type, | |
377 | u32_t* key, u32_t* micKey, u16_t staAid); | |
378 | u32_t zfHpSetApGroupKey(zdev_t* dev, u16_t* apMacAddr, u8_t type, | |
379 | u32_t* key, u32_t* micKey, u16_t vapId); | |
380 | u32_t zfHpSetDefaultKey(zdev_t* dev, u8_t keyId, u8_t type, u32_t* key, u32_t* micKey); | |
381 | u32_t zfHpSetPerUserKey(zdev_t* dev, u8_t user, u8_t keyId, u8_t* mac, u8_t type, u32_t* key, u32_t* micKey); | |
382 | ||
383 | void zfHpSendBeacon(zdev_t* dev, zbuf_t* buf, u16_t len); | |
384 | u16_t zfHpGetPayloadLen(zdev_t* dev, | |
385 | zbuf_t* buf, | |
386 | u16_t len, | |
387 | u16_t plcpHdrLen, | |
388 | u32_t *rxMT, | |
389 | u32_t *rxMCS, | |
390 | u32_t *rxBW, | |
391 | u32_t *rxSG | |
392 | ); | |
393 | u32_t zfHpGetFreeTxdCount(zdev_t* dev); | |
394 | u32_t zfHpGetMaxTxdCount(zdev_t* dev); | |
395 | u16_t zfHpSend(zdev_t* dev, u16_t* header, u16_t headerLen, | |
396 | u16_t* snap, u16_t snapLen, u16_t* tail, u16_t tailLen, zbuf_t* buf, | |
397 | u16_t offset, u16_t bufType, u8_t ac, u8_t keyIdx); | |
398 | void zfHpGetRegulationTablefromRegionCode(zdev_t* dev, u16_t regionCode); | |
399 | void zfHpGetRegulationTablefromCountry(zdev_t* dev, u16_t CountryCode); | |
400 | u8_t zfHpGetRegulationTablefromISO(zdev_t* dev, u8_t *countryInfo, u8_t length); | |
401 | const char* zfHpGetisoNamefromregionCode(zdev_t* dev, u16_t regionCode); | |
402 | u16_t zfHpGetRegionCodeFromIsoName(zdev_t* dev, u8_t *countryIsoName); | |
403 | u8_t zfHpGetRegulatoryDomain(zdev_t* dev); | |
404 | void zfHpLedCtrl(zdev_t* dev, u16_t ledId, u8_t mode); | |
405 | u16_t zfHpResetTxRx(zdev_t* dev); | |
406 | u16_t zfHpDeleteAllowChannel(zdev_t* dev, u16_t freq); | |
407 | u16_t zfHpAddAllowChannel(zdev_t* dev, u16_t freq); | |
408 | u32_t zfHpCwmUpdate(zdev_t* dev); | |
409 | u32_t zfHpAniUpdate(zdev_t* dev); | |
410 | u32_t zfHpAniUpdateRssi(zdev_t* dev, u8_t rssi); | |
411 | void zfHpAniAttach(zdev_t* dev); | |
412 | void zfHpAniArPoll(zdev_t* dev, u32_t listenTime, u32_t phyCnt1, u32_t phyCnt2); | |
413 | void zfHpHeartBeat(zdev_t* dev); | |
414 | void zfHpPowerSaveSetState(zdev_t* dev, u8_t psState); | |
415 | void zfHpPowerSaveSetMode(zdev_t* dev, u8_t staMode, u8_t psMode, u16_t bcnInterval); | |
416 | u16_t zfHpIsDfsChannel(zdev_t* dev, u16_t freq); | |
417 | u16_t zfHpIsDfsChannelNCS(zdev_t* dev, u16_t freq); | |
418 | u16_t zfHpFindFirstNonDfsChannel(zdev_t* dev, u16_t aBand); | |
419 | u16_t zfHpIsAllowedChannel(zdev_t* dev, u16_t freq); | |
420 | void zfHpDisableDfsChannel(zdev_t* dev, u8_t disableFlag); | |
421 | void zfHpSetTTSIFSTime(zdev_t* dev, u8_t sifs_time); | |
422 | ||
423 | void zfHpQueryMonHalRxInfo(zdev_t* dev, u8_t *monHalRxInfo); | |
424 | ||
425 | void zfDumpSSID(u8_t length, u8_t *value); | |
426 | void zfHpSetAggPktNum(zdev_t* dev, u32_t num); | |
427 | void zfHpSetMPDUDensity(zdev_t* dev, u8_t density); | |
428 | void zfHpSetSlotTime(zdev_t* dev, u8_t type); | |
429 | void zfHpSetSlotTimeRegister(zdev_t* dev, u8_t type); | |
430 | void zfHpSetRifs(zdev_t* dev, u8_t ht_enable, u8_t ht2040, u8_t g_mode); | |
431 | void zfHpBeginSiteSurvey(zdev_t* dev, u8_t status); | |
432 | void zfHpFinishSiteSurvey(zdev_t* dev, u8_t status); | |
433 | u16_t zfHpEnableHwRetry(zdev_t* dev); | |
434 | u16_t zfHpDisableHwRetry(zdev_t* dev); | |
435 | void zfHpSWDecrypt(zdev_t* dev, u8_t enable); | |
436 | void zfHpSWEncrypt(zdev_t* dev, u8_t enable); | |
437 | u32_t zfHpCapability(zdev_t* dev); | |
438 | void zfHpSetRollCallTable(zdev_t* dev); | |
439 | u8_t zfHpregulatoryDomain(zdev_t* dev); | |
440 | u16_t zfStaAddIePowerCap(zdev_t* dev, zbuf_t* buf, u16_t offset); | |
441 | u8_t zfHpGetMaxTxPower(zdev_t* dev); | |
442 | u8_t zfHpGetMinTxPower(zdev_t* dev); | |
443 | u16_t zfStaAddIeSupportCh(zdev_t* dev, zbuf_t* buf, u16_t offset); | |
444 | void zfHpEnableRifs(zdev_t* dev, u8_t mode24g, u8_t modeHt, u8_t modeHt2040); | |
445 | void zfHpDisableRifs(zdev_t* dev); | |
446 | u16_t zfHpUsbReset(zdev_t* dev); | |
447 | ||
448 | ||
449 | #endif /* #ifndef _CFUNC_H */ |