ASoC: Remove duplicate ADC/DAC widgets from wm_hubs.c
[linux/fpc-iii.git] / drivers / staging / rt2860 / ap.h
bloba814d55abefffdd6d974824e9ef416ac102c0a4c
1 /*
2 *************************************************************************
3 * Ralink Tech Inc.
4 * 5F., No.36, Taiyuan St., Jhubei City,
5 * Hsinchu County 302,
6 * Taiwan, R.O.C.
8 * (c) Copyright 2002-2007, Ralink Technology, Inc.
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 * This program is distributed in the hope that it will be useful, *
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 * GNU General Public License for more details. *
19 * *
20 * You should have received a copy of the GNU General Public License *
21 * along with this program; if not, write to the *
22 * Free Software Foundation, Inc., *
23 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 * *
25 *************************************************************************
27 Module Name:
28 ap.h
30 Abstract:
31 Miniport generic portion header file
33 Revision History:
34 Who When What
35 -------- ---------- ----------------------------------------------
36 Paul Lin 08-01-2002 created
37 James Tan 09-06-2002 modified (Revise NTCRegTable)
38 John Chang 12-22-2004 modified for RT2561/2661. merge with STA driver
40 #ifndef __AP_H__
41 #define __AP_H__
45 // ========================= AP RTMP.h ================================
49 // =============================================================
50 // Function Prototypes
51 // =============================================================
53 // ap_data.c
55 BOOLEAN APBridgeToWirelessSta(
56 IN PRTMP_ADAPTER pAd,
57 IN PUCHAR pHeader,
58 IN UINT HdrLen,
59 IN PUCHAR pData,
60 IN UINT DataLen,
61 IN ULONG fromwdsidx);
63 BOOLEAN APHandleRxDoneInterrupt(
64 IN PRTMP_ADAPTER pAd);
66 VOID APSendPackets(
67 IN NDIS_HANDLE MiniportAdapterContext,
68 IN PPNDIS_PACKET ppPacketArray,
69 IN UINT NumberOfPackets);
71 NDIS_STATUS APSendPacket(
72 IN PRTMP_ADAPTER pAd,
73 IN PNDIS_PACKET pPacket);
76 NDIS_STATUS APHardTransmit(
77 IN PRTMP_ADAPTER pAd,
78 IN TX_BLK *pTxBlk,
79 IN UCHAR QueIdx);
81 VOID APRxEAPOLFrameIndicate(
82 IN PRTMP_ADAPTER pAd,
83 IN MAC_TABLE_ENTRY *pEntry,
84 IN RX_BLK *pRxBlk,
85 IN UCHAR FromWhichBSSID);
87 NDIS_STATUS APCheckRxError(
88 IN PRTMP_ADAPTER pAd,
89 IN PRT28XX_RXD_STRUC pRxD,
90 IN UCHAR Wcid);
92 BOOLEAN APCheckClass2Class3Error(
93 IN PRTMP_ADAPTER pAd,
94 IN ULONG Wcid,
95 IN PHEADER_802_11 pHeader);
97 VOID APHandleRxPsPoll(
98 IN PRTMP_ADAPTER pAd,
99 IN PUCHAR pAddr,
100 IN USHORT Aid,
101 IN BOOLEAN isActive);
103 VOID RTMPDescriptorEndianChange(
104 IN PUCHAR pData,
105 IN ULONG DescriptorType);
107 VOID RTMPFrameEndianChange(
108 IN PRTMP_ADAPTER pAd,
109 IN PUCHAR pData,
110 IN ULONG Dir,
111 IN BOOLEAN FromRxDoneInt);
113 // ap_assoc.c
115 VOID APAssocStateMachineInit(
116 IN PRTMP_ADAPTER pAd,
117 IN STATE_MACHINE *S,
118 OUT STATE_MACHINE_FUNC Trans[]);
120 VOID APPeerAssocReqAction(
121 IN PRTMP_ADAPTER pAd,
122 IN MLME_QUEUE_ELEM *Elem);
124 VOID APPeerReassocReqAction(
125 IN PRTMP_ADAPTER pAd,
126 IN MLME_QUEUE_ELEM *Elem);
128 VOID APPeerDisassocReqAction(
129 IN PRTMP_ADAPTER pAd,
130 IN MLME_QUEUE_ELEM *Elem);
132 VOID MbssKickOutStas(
133 IN PRTMP_ADAPTER pAd,
134 IN INT apidx,
135 IN USHORT Reason);
137 VOID APMlmeKickOutSta(
138 IN PRTMP_ADAPTER pAd,
139 IN PUCHAR pStaAddr,
140 IN UCHAR Wcid,
141 IN USHORT Reason);
143 VOID APMlmeDisassocReqAction(
144 IN PRTMP_ADAPTER pAd,
145 IN MLME_QUEUE_ELEM *Elem);
147 VOID APCls3errAction(
148 IN PRTMP_ADAPTER pAd,
149 IN ULONG Wcid,
150 IN PHEADER_802_11 pHeader);
153 USHORT APBuildAssociation(
154 IN PRTMP_ADAPTER pAd,
155 IN MAC_TABLE_ENTRY *pEntry,
156 IN USHORT CapabilityInfo,
157 IN UCHAR MaxSupportedRateIn500Kbps,
158 IN UCHAR *RSN,
159 IN UCHAR *pRSNLen,
160 IN BOOLEAN bWmmCapable,
161 IN ULONG RalinkIe,
162 IN HT_CAPABILITY_IE *pHtCapability,
163 IN UCHAR HtCapabilityLen,
164 OUT USHORT *pAid);
166 // ap_auth.c
168 void APAuthStateMachineInit(
169 IN PRTMP_ADAPTER pAd,
170 IN STATE_MACHINE *Sm,
171 OUT STATE_MACHINE_FUNC Trans[]);
173 VOID APMlmeDeauthReqAction(
174 IN PRTMP_ADAPTER pAd,
175 IN MLME_QUEUE_ELEM *Elem);
177 VOID APCls2errAction(
178 IN PRTMP_ADAPTER pAd,
179 IN ULONG Wcid,
180 IN PHEADER_802_11 pHeader);
182 // ap_authrsp.c
184 VOID APAuthRspStateMachineInit(
185 IN PRTMP_ADAPTER pAd,
186 IN PSTATE_MACHINE Sm,
187 IN STATE_MACHINE_FUNC Trans[]);
189 VOID APPeerAuthAtAuthRspIdleAction(
190 IN PRTMP_ADAPTER pAd,
191 IN MLME_QUEUE_ELEM *Elem);
193 VOID APPeerDeauthReqAction(
194 IN PRTMP_ADAPTER pAd,
195 IN MLME_QUEUE_ELEM *Elem);
197 VOID APPeerAuthSimpleRspGenAndSend(
198 IN PRTMP_ADAPTER pAd,
199 IN PHEADER_802_11 pHdr80211,
200 IN USHORT Alg,
201 IN USHORT Seq,
202 IN USHORT StatusCode);
204 // ap_connect.c
206 BOOLEAN BeaconTransmitRequired(
207 IN PRTMP_ADAPTER pAd,
208 IN INT apidx);
210 VOID APMakeBssBeacon(
211 IN PRTMP_ADAPTER pAd,
212 IN INT apidx);
214 VOID APUpdateBeaconFrame(
215 IN PRTMP_ADAPTER pAd,
216 IN INT apidx);
218 VOID APMakeAllBssBeacon(
219 IN PRTMP_ADAPTER pAd);
221 VOID APUpdateAllBeaconFrame(
222 IN PRTMP_ADAPTER pAd);
225 // ap_sync.c
227 VOID APSyncStateMachineInit(
228 IN PRTMP_ADAPTER pAd,
229 IN STATE_MACHINE *Sm,
230 OUT STATE_MACHINE_FUNC Trans[]);
232 VOID APScanTimeout(
233 IN PVOID SystemSpecific1,
234 IN PVOID FunctionContext,
235 IN PVOID SystemSpecific2,
236 IN PVOID SystemSpecific3);
238 VOID APInvalidStateWhenScan(
239 IN PRTMP_ADAPTER pAd,
240 IN MLME_QUEUE_ELEM *Elem);
242 VOID APScanTimeoutAction(
243 IN PRTMP_ADAPTER pAd,
244 IN MLME_QUEUE_ELEM *Elem);
246 VOID APPeerProbeReqAction(
247 IN PRTMP_ADAPTER pAd,
248 IN MLME_QUEUE_ELEM *Elem);
250 VOID APPeerBeaconAction(
251 IN PRTMP_ADAPTER pAd,
252 IN MLME_QUEUE_ELEM *Elem);
254 VOID APMlmeScanReqAction(
255 IN PRTMP_ADAPTER pAd,
256 IN MLME_QUEUE_ELEM *Elem);
258 VOID APPeerBeaconAtScanAction(
259 IN PRTMP_ADAPTER pAd,
260 IN MLME_QUEUE_ELEM *Elem);
262 VOID APScanCnclAction(
263 IN PRTMP_ADAPTER pAd,
264 IN MLME_QUEUE_ELEM *Elem);
266 VOID ApSiteSurvey(
267 IN PRTMP_ADAPTER pAd);
269 VOID SupportRate(
270 IN PUCHAR SupRate,
271 IN UCHAR SupRateLen,
272 IN PUCHAR ExtRate,
273 IN UCHAR ExtRateLen,
274 OUT PUCHAR *Rates,
275 OUT PUCHAR RatesLen,
276 OUT PUCHAR pMaxSupportRate);
279 BOOLEAN ApScanRunning(
280 IN PRTMP_ADAPTER pAd);
282 // ap_wpa.c
284 VOID APWpaStateMachineInit(
285 IN PRTMP_ADAPTER pAd,
286 IN STATE_MACHINE *Sm,
287 OUT STATE_MACHINE_FUNC Trans[]);
289 // ap_mlme.c
291 VOID APMlmePeriodicExec(
292 IN PRTMP_ADAPTER pAd);
294 VOID APMlmeSelectTxRateTable(
295 IN PRTMP_ADAPTER pAd,
296 IN PMAC_TABLE_ENTRY pEntry,
297 IN PUCHAR *ppTable,
298 IN PUCHAR pTableSize,
299 IN PUCHAR pInitTxRateIdx);
301 VOID APMlmeSetTxRate(
302 IN PRTMP_ADAPTER pAd,
303 IN PMAC_TABLE_ENTRY pEntry,
304 IN PRTMP_TX_RATE_SWITCH pTxRate);
306 VOID APMlmeDynamicTxRateSwitching(
307 IN PRTMP_ADAPTER pAd);
309 VOID APQuickResponeForRateUpExec(
310 IN PVOID SystemSpecific1,
311 IN PVOID FunctionContext,
312 IN PVOID SystemSpecific2,
313 IN PVOID SystemSpecific3);
315 BOOLEAN APMsgTypeSubst(
316 IN PRTMP_ADAPTER pAd,
317 IN PFRAME_802_11 pFrame,
318 OUT INT *Machine,
319 OUT INT *MsgType);
321 VOID APQuickResponeForRateUpExec(
322 IN PVOID SystemSpecific1,
323 IN PVOID FunctionContext,
324 IN PVOID SystemSpecific2,
325 IN PVOID SystemSpecific3);
327 #ifdef RT2870
328 VOID BeaconUpdateExec(
329 IN PVOID SystemSpecific1,
330 IN PVOID FunctionContext,
331 IN PVOID SystemSpecific2,
332 IN PVOID SystemSpecific3);
333 #endif // RT2870 //
335 VOID RTMPSetPiggyBack(
336 IN PRTMP_ADAPTER pAd,
337 IN BOOLEAN bPiggyBack);
339 VOID APAsicEvaluateRxAnt(
340 IN PRTMP_ADAPTER pAd);
342 VOID APAsicRxAntEvalTimeout(
343 IN PRTMP_ADAPTER pAd);
345 // ap.c
347 VOID APSwitchChannel(
348 IN PRTMP_ADAPTER pAd,
349 IN INT Channel);
351 NDIS_STATUS APInitialize(
352 IN PRTMP_ADAPTER pAd);
354 VOID APShutdown(
355 IN PRTMP_ADAPTER pAd);
357 VOID APStartUp(
358 IN PRTMP_ADAPTER pAd);
360 VOID APStop(
361 IN PRTMP_ADAPTER pAd);
363 VOID APCleanupPsQueue(
364 IN PRTMP_ADAPTER pAd,
365 IN PQUEUE_HEADER pQueue);
367 VOID MacTableReset(
368 IN PRTMP_ADAPTER pAd);
370 MAC_TABLE_ENTRY *MacTableInsertEntry(
371 IN PRTMP_ADAPTER pAd,
372 IN PUCHAR pAddr,
373 IN UCHAR apidx,
374 IN BOOLEAN CleanAll);
376 BOOLEAN MacTableDeleteEntry(
377 IN PRTMP_ADAPTER pAd,
378 IN USHORT wcid,
379 IN PUCHAR pAddr);
381 MAC_TABLE_ENTRY *MacTableLookup(
382 IN PRTMP_ADAPTER pAd,
383 IN PUCHAR pAddr);
385 VOID MacTableMaintenance(
386 IN PRTMP_ADAPTER pAd);
388 UINT32 MacTableAssocStaNumGet(
389 IN PRTMP_ADAPTER pAd);
391 MAC_TABLE_ENTRY *APSsPsInquiry(
392 IN PRTMP_ADAPTER pAd,
393 IN PUCHAR pAddr,
394 OUT SST *Sst,
395 OUT USHORT *Aid,
396 OUT UCHAR *PsMode,
397 OUT UCHAR *Rate);
399 BOOLEAN APPsIndicate(
400 IN PRTMP_ADAPTER pAd,
401 IN PUCHAR pAddr,
402 IN ULONG Wcid,
403 IN UCHAR Psm);
405 VOID ApLogEvent(
406 IN PRTMP_ADAPTER pAd,
407 IN PUCHAR pAddr,
408 IN USHORT Event);
410 VOID APUpdateOperationMode(
411 IN PRTMP_ADAPTER pAd);
413 VOID APUpdateCapabilityAndErpIe(
414 IN PRTMP_ADAPTER pAd);
416 BOOLEAN ApCheckAccessControlList(
417 IN PRTMP_ADAPTER pAd,
418 IN PUCHAR pAddr,
419 IN UCHAR Apidx);
421 VOID ApUpdateAccessControlList(
422 IN PRTMP_ADAPTER pAd,
423 IN UCHAR Apidx);
425 VOID ApEnqueueNullFrame(
426 IN PRTMP_ADAPTER pAd,
427 IN PUCHAR pAddr,
428 IN UCHAR TxRate,
429 IN UCHAR PID,
430 IN UCHAR apidx,
431 IN BOOLEAN bQosNull,
432 IN BOOLEAN bEOSP,
433 IN UCHAR OldUP);
435 VOID ApSendFrame(
436 IN PRTMP_ADAPTER pAd,
437 IN PVOID pBuffer,
438 IN ULONG Length,
439 IN UCHAR TxRate,
440 IN UCHAR PID);
442 VOID ApEnqueueAckFrame(
443 IN PRTMP_ADAPTER pAd,
444 IN PUCHAR pAddr,
445 IN UCHAR TxRate,
446 IN UCHAR apidx);
448 UCHAR APAutoSelectChannel(
449 IN PRTMP_ADAPTER pAd,
450 IN BOOLEAN Optimal);
452 // ap_sanity.c
455 BOOLEAN PeerAssocReqCmmSanity(
456 IN PRTMP_ADAPTER pAd,
457 IN BOOLEAN isRessoc,
458 IN VOID *Msg,
459 IN ULONG MsgLen,
460 OUT PUCHAR pAddr2,
461 OUT USHORT *pCapabilityInfo,
462 OUT USHORT *pListenInterval,
463 OUT PUCHAR pApAddr,
464 OUT UCHAR *pSsidLen,
465 OUT char *Ssid,
466 OUT UCHAR *pRatesLen,
467 OUT UCHAR Rates[],
468 OUT UCHAR *RSN,
469 OUT UCHAR *pRSNLen,
470 OUT BOOLEAN *pbWmmCapable,
471 OUT ULONG *pRalinkIe,
472 OUT UCHAR *pHtCapabilityLen,
473 OUT HT_CAPABILITY_IE *pHtCapability);
475 BOOLEAN PeerDisassocReqSanity(
476 IN PRTMP_ADAPTER pAd,
477 IN VOID *Msg,
478 IN ULONG MsgLen,
479 OUT PUCHAR pAddr2,
480 OUT USHORT *Reason);
482 BOOLEAN PeerDeauthReqSanity(
483 IN PRTMP_ADAPTER pAd,
484 IN VOID *Msg,
485 IN ULONG MsgLen,
486 OUT PUCHAR pAddr2,
487 OUT USHORT *Reason);
489 BOOLEAN APPeerAuthSanity(
490 IN PRTMP_ADAPTER pAd,
491 IN VOID *Msg,
492 IN ULONG MsgLen,
493 OUT PUCHAR pAddr1,
494 OUT PUCHAR pAddr2,
495 OUT USHORT *Alg,
496 OUT USHORT *Seq,
497 OUT USHORT *Status,
498 CHAR *ChlgText);
500 BOOLEAN APPeerProbeReqSanity(
501 IN PRTMP_ADAPTER pAd,
502 IN VOID *Msg,
503 IN ULONG MsgLen,
504 OUT PUCHAR pAddr2,
505 OUT CHAR Ssid[],
506 OUT UCHAR *SsidLen);
508 BOOLEAN APPeerBeaconAndProbeRspSanity(
509 IN PRTMP_ADAPTER pAd,
510 IN VOID *Msg,
511 IN ULONG MsgLen,
512 OUT PUCHAR pAddr2,
513 OUT PUCHAR pBssid,
514 OUT CHAR Ssid[],
515 OUT UCHAR *SsidLen,
516 OUT UCHAR *BssType,
517 OUT USHORT *BeaconPeriod,
518 OUT UCHAR *Channel,
519 OUT LARGE_INTEGER *Timestamp,
520 OUT USHORT *CapabilityInfo,
521 OUT UCHAR Rate[],
522 OUT UCHAR *RateLen,
523 OUT BOOLEAN *ExtendedRateIeExist,
524 OUT UCHAR *Erp);
527 // ================== end of AP RTMP.h ========================
530 #endif // __AP_H__