2 *************************************************************************
4 * 5F., No.36, Taiyuan St., Jhubei City,
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. *
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. *
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. *
25 *************************************************************************
31 Miniport generic portion header file
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
45 // ========================= AP RTMP.h ================================
49 // =============================================================
50 // Function Prototypes
51 // =============================================================
55 BOOLEAN APBridgeToWirelessSta(
63 BOOLEAN APHandleRxDoneInterrupt(
64 IN PRTMP_ADAPTER pAd);
67 IN NDIS_HANDLE MiniportAdapterContext,
68 IN PPNDIS_PACKET ppPacketArray,
69 IN UINT NumberOfPackets);
71 NDIS_STATUS APSendPacket(
73 IN PNDIS_PACKET pPacket);
76 NDIS_STATUS APHardTransmit(
81 VOID APRxEAPOLFrameIndicate(
83 IN MAC_TABLE_ENTRY *pEntry,
85 IN UCHAR FromWhichBSSID);
87 NDIS_STATUS APCheckRxError(
89 IN PRT28XX_RXD_STRUC pRxD,
92 BOOLEAN APCheckClass2Class3Error(
95 IN PHEADER_802_11 pHeader);
97 VOID APHandleRxPsPoll(
101 IN BOOLEAN isActive);
103 VOID RTMPDescriptorEndianChange(
105 IN ULONG DescriptorType);
107 VOID RTMPFrameEndianChange(
108 IN PRTMP_ADAPTER pAd,
111 IN BOOLEAN FromRxDoneInt);
115 VOID APAssocStateMachineInit(
116 IN PRTMP_ADAPTER pAd,
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,
137 VOID APMlmeKickOutSta(
138 IN PRTMP_ADAPTER pAd,
143 VOID APMlmeDisassocReqAction(
144 IN PRTMP_ADAPTER pAd,
145 IN MLME_QUEUE_ELEM *Elem);
147 VOID APCls3errAction(
148 IN PRTMP_ADAPTER pAd,
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,
160 IN BOOLEAN bWmmCapable,
162 IN HT_CAPABILITY_IE *pHtCapability,
163 IN UCHAR HtCapabilityLen,
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,
180 IN PHEADER_802_11 pHeader);
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,
202 IN USHORT StatusCode);
206 BOOLEAN BeaconTransmitRequired(
207 IN PRTMP_ADAPTER pAd,
210 VOID APMakeBssBeacon(
211 IN PRTMP_ADAPTER pAd,
214 VOID APUpdateBeaconFrame(
215 IN PRTMP_ADAPTER pAd,
218 VOID APMakeAllBssBeacon(
219 IN PRTMP_ADAPTER pAd);
221 VOID APUpdateAllBeaconFrame(
222 IN PRTMP_ADAPTER pAd);
227 VOID APSyncStateMachineInit(
228 IN PRTMP_ADAPTER pAd,
229 IN STATE_MACHINE *Sm,
230 OUT STATE_MACHINE_FUNC Trans[]);
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);
267 IN PRTMP_ADAPTER pAd);
276 OUT PUCHAR pMaxSupportRate);
279 BOOLEAN ApScanRunning(
280 IN PRTMP_ADAPTER pAd);
284 VOID APWpaStateMachineInit(
285 IN PRTMP_ADAPTER pAd,
286 IN STATE_MACHINE *Sm,
287 OUT STATE_MACHINE_FUNC Trans[]);
291 VOID APMlmePeriodicExec(
292 IN PRTMP_ADAPTER pAd);
294 VOID APMlmeSelectTxRateTable(
295 IN PRTMP_ADAPTER pAd,
296 IN PMAC_TABLE_ENTRY pEntry,
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,
321 VOID APQuickResponeForRateUpExec(
322 IN PVOID SystemSpecific1,
323 IN PVOID FunctionContext,
324 IN PVOID SystemSpecific2,
325 IN PVOID SystemSpecific3);
328 VOID RTMPSetPiggyBack(
329 IN PRTMP_ADAPTER pAd,
330 IN BOOLEAN bPiggyBack);
332 VOID APAsicEvaluateRxAnt(
333 IN PRTMP_ADAPTER pAd);
335 VOID APAsicRxAntEvalTimeout(
336 IN PRTMP_ADAPTER pAd);
340 VOID APSwitchChannel(
341 IN PRTMP_ADAPTER pAd,
344 NDIS_STATUS APInitialize(
345 IN PRTMP_ADAPTER pAd);
348 IN PRTMP_ADAPTER pAd);
351 IN PRTMP_ADAPTER pAd);
354 IN PRTMP_ADAPTER pAd);
356 VOID APCleanupPsQueue(
357 IN PRTMP_ADAPTER pAd,
358 IN PQUEUE_HEADER pQueue);
361 IN PRTMP_ADAPTER pAd);
363 MAC_TABLE_ENTRY *MacTableInsertEntry(
364 IN PRTMP_ADAPTER pAd,
367 IN BOOLEAN CleanAll);
369 BOOLEAN MacTableDeleteEntry(
370 IN PRTMP_ADAPTER pAd,
374 MAC_TABLE_ENTRY *MacTableLookup(
375 IN PRTMP_ADAPTER pAd,
378 VOID MacTableMaintenance(
379 IN PRTMP_ADAPTER pAd);
381 UINT32 MacTableAssocStaNumGet(
382 IN PRTMP_ADAPTER pAd);
384 MAC_TABLE_ENTRY *APSsPsInquiry(
385 IN PRTMP_ADAPTER pAd,
392 BOOLEAN APPsIndicate(
393 IN PRTMP_ADAPTER pAd,
399 IN PRTMP_ADAPTER pAd,
403 VOID APUpdateOperationMode(
404 IN PRTMP_ADAPTER pAd);
406 VOID APUpdateCapabilityAndErpIe(
407 IN PRTMP_ADAPTER pAd);
409 BOOLEAN ApCheckAccessControlList(
410 IN PRTMP_ADAPTER pAd,
414 VOID ApUpdateAccessControlList(
415 IN PRTMP_ADAPTER pAd,
418 VOID ApEnqueueNullFrame(
419 IN PRTMP_ADAPTER pAd,
429 IN PRTMP_ADAPTER pAd,
435 VOID ApEnqueueAckFrame(
436 IN PRTMP_ADAPTER pAd,
441 UCHAR APAutoSelectChannel(
442 IN PRTMP_ADAPTER pAd,
448 BOOLEAN PeerAssocReqCmmSanity(
449 IN PRTMP_ADAPTER pAd,
454 OUT USHORT *pCapabilityInfo,
455 OUT USHORT *pListenInterval,
459 OUT UCHAR *pRatesLen,
463 OUT BOOLEAN *pbWmmCapable,
464 OUT ULONG *pRalinkIe,
465 OUT UCHAR *pHtCapabilityLen,
466 OUT HT_CAPABILITY_IE *pHtCapability);
468 BOOLEAN PeerDisassocReqSanity(
469 IN PRTMP_ADAPTER pAd,
475 BOOLEAN PeerDeauthReqSanity(
476 IN PRTMP_ADAPTER pAd,
482 BOOLEAN APPeerAuthSanity(
483 IN PRTMP_ADAPTER pAd,
493 BOOLEAN APPeerProbeReqSanity(
494 IN PRTMP_ADAPTER pAd,
501 BOOLEAN APPeerBeaconAndProbeRspSanity(
502 IN PRTMP_ADAPTER pAd,
510 OUT USHORT *BeaconPeriod,
512 OUT LARGE_INTEGER *Timestamp,
513 OUT USHORT *CapabilityInfo,
516 OUT BOOLEAN *ExtendedRateIeExist,
523 // ================== end of AP RTMP.h ========================