1 /*****************************************************************************
3 (c) Cambridge Silicon Radio Limited 2012
4 All rights reserved and confidential information of CSR
6 Refer to LICENSE.txt included with this source for details
9 *****************************************************************************/
11 /* Note: this is an auto-generated file. */
13 #ifndef CSR_WIFI_SME_AP_LIB_H__
14 #define CSR_WIFI_SME_AP_LIB_H__
16 #include "csr_types.h"
18 #include "csr_sched.h"
20 #include "csr_msg_transport.h"
22 #include "csr_wifi_lib.h"
24 #include "csr_wifi_sme_ap_prim.h"
25 #include "csr_wifi_sme_task.h"
32 #ifndef CSR_WIFI_AP_ENABLE
33 #error CSR_WIFI_AP_ENABLE MUST be defined inorder to use csr_wifi_sme_ap_lib.h
36 /*----------------------------------------------------------------------------*
37 * CsrWifiSmeApFreeUpstreamMessageContents
40 * Free the allocated memory in a CSR_WIFI_SME_AP upstream message. Does not
41 * free the message itself, and can only be used for upstream messages.
44 * Deallocates the resources in a CSR_WIFI_SME_AP upstream message
45 *----------------------------------------------------------------------------*/
46 void CsrWifiSmeApFreeUpstreamMessageContents(CsrUint16 eventClass, void *message);
48 /*----------------------------------------------------------------------------*
49 * CsrWifiSmeApFreeDownstreamMessageContents
52 * Free the allocated memory in a CSR_WIFI_SME_AP downstream message. Does not
53 * free the message itself, and can only be used for downstream messages.
56 * Deallocates the resources in a CSR_WIFI_SME_AP downstream message
57 *----------------------------------------------------------------------------*/
58 void CsrWifiSmeApFreeDownstreamMessageContents(CsrUint16 eventClass, void *message);
60 /*----------------------------------------------------------------------------*
61 * Enum to string functions
62 *----------------------------------------------------------------------------*/
63 const CsrCharString* CsrWifiSmeApAccessTypeToString(CsrWifiSmeApAccessType value);
64 const CsrCharString* CsrWifiSmeApAuthSupportToString(CsrWifiSmeApAuthSupport value);
65 const CsrCharString* CsrWifiSmeApAuthTypeToString(CsrWifiSmeApAuthType value);
66 const CsrCharString* CsrWifiSmeApDirectionToString(CsrWifiSmeApDirection value);
67 const CsrCharString* CsrWifiSmeApPhySupportToString(CsrWifiSmeApPhySupport value);
68 const CsrCharString* CsrWifiSmeApTypeToString(CsrWifiSmeApType value);
71 /*----------------------------------------------------------------------------*
72 * CsrPrim Type toString function.
73 * Converts a message type to the String name of the Message
74 *----------------------------------------------------------------------------*/
75 const CsrCharString* CsrWifiSmeApPrimTypeToString(CsrPrim msgType);
77 /*----------------------------------------------------------------------------*
78 * Lookup arrays for PrimType name Strings
79 *----------------------------------------------------------------------------*/
80 extern const CsrCharString *CsrWifiSmeApUpstreamPrimNames[CSR_WIFI_SME_AP_PRIM_UPSTREAM_COUNT];
81 extern const CsrCharString *CsrWifiSmeApDownstreamPrimNames[CSR_WIFI_SME_AP_PRIM_DOWNSTREAM_COUNT];
83 /*******************************************************************************
86 CsrWifiSmeApActiveBaGetReqSend
89 This primitive used to retrieve information related to the active block
93 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
96 *******************************************************************************/
97 #define CsrWifiSmeApActiveBaGetReqCreate(msg__, dst__, src__, interfaceTag__) \
98 msg__ = (CsrWifiSmeApActiveBaGetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeApActiveBaGetReq)); \
99 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_ACTIVE_BA_GET_REQ, dst__, src__); \
100 msg__->interfaceTag = (interfaceTag__);
102 #define CsrWifiSmeApActiveBaGetReqSendTo(dst__, src__, interfaceTag__) \
104 CsrWifiSmeApActiveBaGetReq *msg__; \
105 CsrWifiSmeApActiveBaGetReqCreate(msg__, dst__, src__, interfaceTag__); \
106 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
109 #define CsrWifiSmeApActiveBaGetReqSend(src__, interfaceTag__) \
110 CsrWifiSmeApActiveBaGetReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__)
112 /*******************************************************************************
115 CsrWifiSmeApActiveBaGetCfmSend
118 This primitive carries the information related to the active ba sessions
121 queue - Destination Task Queue
123 status - Reports the result of the request
124 activeBaCount - Number of active block ack session
125 activeBaSessions - Points to a buffer containing an array of
126 CsrWifiSmeApBaSession structures.
128 *******************************************************************************/
129 #define CsrWifiSmeApActiveBaGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, activeBaCount__, activeBaSessions__) \
130 msg__ = (CsrWifiSmeApActiveBaGetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeApActiveBaGetCfm)); \
131 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_ACTIVE_BA_GET_CFM, dst__, src__); \
132 msg__->interfaceTag = (interfaceTag__); \
133 msg__->status = (status__); \
134 msg__->activeBaCount = (activeBaCount__); \
135 msg__->activeBaSessions = (activeBaSessions__);
137 #define CsrWifiSmeApActiveBaGetCfmSendTo(dst__, src__, interfaceTag__, status__, activeBaCount__, activeBaSessions__) \
139 CsrWifiSmeApActiveBaGetCfm *msg__; \
140 CsrWifiSmeApActiveBaGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, activeBaCount__, activeBaSessions__); \
141 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
144 #define CsrWifiSmeApActiveBaGetCfmSend(dst__, interfaceTag__, status__, activeBaCount__, activeBaSessions__) \
145 CsrWifiSmeApActiveBaGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, activeBaCount__, activeBaSessions__)
147 /*******************************************************************************
150 CsrWifiSmeApBaDeleteReqSend
153 This primitive is used to delete an active block ack session
156 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
159 baSession - BA session to be deleted
161 *******************************************************************************/
162 #define CsrWifiSmeApBaDeleteReqCreate(msg__, dst__, src__, interfaceTag__, reason__, baSession__) \
163 msg__ = (CsrWifiSmeApBaDeleteReq *) CsrPmemAlloc(sizeof(CsrWifiSmeApBaDeleteReq)); \
164 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BA_DELETE_REQ, dst__, src__); \
165 msg__->interfaceTag = (interfaceTag__); \
166 msg__->reason = (reason__); \
167 msg__->baSession = (baSession__);
169 #define CsrWifiSmeApBaDeleteReqSendTo(dst__, src__, interfaceTag__, reason__, baSession__) \
171 CsrWifiSmeApBaDeleteReq *msg__; \
172 CsrWifiSmeApBaDeleteReqCreate(msg__, dst__, src__, interfaceTag__, reason__, baSession__); \
173 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
176 #define CsrWifiSmeApBaDeleteReqSend(src__, interfaceTag__, reason__, baSession__) \
177 CsrWifiSmeApBaDeleteReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__, reason__, baSession__)
179 /*******************************************************************************
182 CsrWifiSmeApBaDeleteCfmSend
185 This primitive confirms the BA is deleted
188 queue - Destination Task Queue
190 status - Reports the result of the request
191 baSession - deleted BA session
193 *******************************************************************************/
194 #define CsrWifiSmeApBaDeleteCfmCreate(msg__, dst__, src__, interfaceTag__, status__, baSession__) \
195 msg__ = (CsrWifiSmeApBaDeleteCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeApBaDeleteCfm)); \
196 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BA_DELETE_CFM, dst__, src__); \
197 msg__->interfaceTag = (interfaceTag__); \
198 msg__->status = (status__); \
199 msg__->baSession = (baSession__);
201 #define CsrWifiSmeApBaDeleteCfmSendTo(dst__, src__, interfaceTag__, status__, baSession__) \
203 CsrWifiSmeApBaDeleteCfm *msg__; \
204 CsrWifiSmeApBaDeleteCfmCreate(msg__, dst__, src__, interfaceTag__, status__, baSession__); \
205 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
208 #define CsrWifiSmeApBaDeleteCfmSend(dst__, interfaceTag__, status__, baSession__) \
209 CsrWifiSmeApBaDeleteCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, baSession__)
211 /*******************************************************************************
214 CsrWifiSmeApBeaconingStartReqSend
217 This primitive requests the SME to start AP or GO functionality
220 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
222 initialPresence - Set to 0, if Not in a group fomration phase, set to 1 ,
223 during group formation phase
224 apType - apType : Legacy AP or P2PGO
225 cloakSsid - cloakSsid flag.
227 ifIndex - Radio Interface
229 maxConnections - Maximum Stations + P2PClients allowed
230 apCredentials - AP security credeitals used to advertise in beacon /probe
232 smeApConfig - AP configuration
233 p2pGoParam - P2P specific GO parameters. Ignored if it is a leagacy AP
235 *******************************************************************************/
236 #define CsrWifiSmeApBeaconingStartReqCreate(msg__, dst__, src__, interfaceTag__, initialPresence__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, maxConnections__, apCredentials__, smeApConfig__, p2pGoParam__) \
237 msg__ = (CsrWifiSmeApBeaconingStartReq *) CsrPmemAlloc(sizeof(CsrWifiSmeApBeaconingStartReq)); \
238 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BEACONING_START_REQ, dst__, src__); \
239 msg__->interfaceTag = (interfaceTag__); \
240 msg__->initialPresence = (initialPresence__); \
241 msg__->apType = (apType__); \
242 msg__->cloakSsid = (cloakSsid__); \
243 msg__->ssid = (ssid__); \
244 msg__->ifIndex = (ifIndex__); \
245 msg__->channel = (channel__); \
246 msg__->maxConnections = (maxConnections__); \
247 msg__->apCredentials = (apCredentials__); \
248 msg__->smeApConfig = (smeApConfig__); \
249 msg__->p2pGoParam = (p2pGoParam__);
251 #define CsrWifiSmeApBeaconingStartReqSendTo(dst__, src__, interfaceTag__, initialPresence__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, maxConnections__, apCredentials__, smeApConfig__, p2pGoParam__) \
253 CsrWifiSmeApBeaconingStartReq *msg__; \
254 CsrWifiSmeApBeaconingStartReqCreate(msg__, dst__, src__, interfaceTag__, initialPresence__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, maxConnections__, apCredentials__, smeApConfig__, p2pGoParam__); \
255 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
258 #define CsrWifiSmeApBeaconingStartReqSend(src__, interfaceTag__, initialPresence__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, maxConnections__, apCredentials__, smeApConfig__, p2pGoParam__) \
259 CsrWifiSmeApBeaconingStartReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__, initialPresence__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, maxConnections__, apCredentials__, smeApConfig__, p2pGoParam__)
261 /*******************************************************************************
264 CsrWifiSmeApBeaconingStartCfmSend
267 This primitive confirms the completion of the request along with the
271 queue - Destination Task Queue
277 *******************************************************************************/
278 #define CsrWifiSmeApBeaconingStartCfmCreate(msg__, dst__, src__, interfaceTag__, status__, secIeLength__, secIe__) \
279 msg__ = (CsrWifiSmeApBeaconingStartCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeApBeaconingStartCfm)); \
280 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BEACONING_START_CFM, dst__, src__); \
281 msg__->interfaceTag = (interfaceTag__); \
282 msg__->status = (status__); \
283 msg__->secIeLength = (secIeLength__); \
284 msg__->secIe = (secIe__);
286 #define CsrWifiSmeApBeaconingStartCfmSendTo(dst__, src__, interfaceTag__, status__, secIeLength__, secIe__) \
288 CsrWifiSmeApBeaconingStartCfm *msg__; \
289 CsrWifiSmeApBeaconingStartCfmCreate(msg__, dst__, src__, interfaceTag__, status__, secIeLength__, secIe__); \
290 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
293 #define CsrWifiSmeApBeaconingStartCfmSend(dst__, interfaceTag__, status__, secIeLength__, secIe__) \
294 CsrWifiSmeApBeaconingStartCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, secIeLength__, secIe__)
296 /*******************************************************************************
299 CsrWifiSmeApBeaconingStopReqSend
302 This primitive requests the SME to STOP AP or P2PGO operation
305 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
308 *******************************************************************************/
309 #define CsrWifiSmeApBeaconingStopReqCreate(msg__, dst__, src__, interfaceTag__) \
310 msg__ = (CsrWifiSmeApBeaconingStopReq *) CsrPmemAlloc(sizeof(CsrWifiSmeApBeaconingStopReq)); \
311 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BEACONING_STOP_REQ, dst__, src__); \
312 msg__->interfaceTag = (interfaceTag__);
314 #define CsrWifiSmeApBeaconingStopReqSendTo(dst__, src__, interfaceTag__) \
316 CsrWifiSmeApBeaconingStopReq *msg__; \
317 CsrWifiSmeApBeaconingStopReqCreate(msg__, dst__, src__, interfaceTag__); \
318 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
321 #define CsrWifiSmeApBeaconingStopReqSend(src__, interfaceTag__) \
322 CsrWifiSmeApBeaconingStopReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__)
324 /*******************************************************************************
327 CsrWifiSmeApBeaconingStopCfmSend
330 This primitive confirms AP or P2PGO operation is terminated
333 queue - Destination Task Queue
337 *******************************************************************************/
338 #define CsrWifiSmeApBeaconingStopCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
339 msg__ = (CsrWifiSmeApBeaconingStopCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeApBeaconingStopCfm)); \
340 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BEACONING_STOP_CFM, dst__, src__); \
341 msg__->interfaceTag = (interfaceTag__); \
342 msg__->status = (status__);
344 #define CsrWifiSmeApBeaconingStopCfmSendTo(dst__, src__, interfaceTag__, status__) \
346 CsrWifiSmeApBeaconingStopCfm *msg__; \
347 CsrWifiSmeApBeaconingStopCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
348 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
351 #define CsrWifiSmeApBeaconingStopCfmSend(dst__, interfaceTag__, status__) \
352 CsrWifiSmeApBeaconingStopCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
354 /*******************************************************************************
357 CsrWifiSmeApErrorIndSend
360 This primitve is sent by SME to indicate some error in AP operationi
361 after AP operations were started successfully and continuing the AP
362 operation may lead to undesired behaviour. It is the responsibility of
363 the upper layers to stop AP operation if needed
366 queue - Destination Task Queue
367 interfaceTag - Range 0-1
369 status - Contains the error status
371 *******************************************************************************/
372 #define CsrWifiSmeApErrorIndCreate(msg__, dst__, src__, interfaceTag__, apType__, status__) \
373 msg__ = (CsrWifiSmeApErrorInd *) CsrPmemAlloc(sizeof(CsrWifiSmeApErrorInd)); \
374 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_ERROR_IND, dst__, src__); \
375 msg__->interfaceTag = (interfaceTag__); \
376 msg__->apType = (apType__); \
377 msg__->status = (status__);
379 #define CsrWifiSmeApErrorIndSendTo(dst__, src__, interfaceTag__, apType__, status__) \
381 CsrWifiSmeApErrorInd *msg__; \
382 CsrWifiSmeApErrorIndCreate(msg__, dst__, src__, interfaceTag__, apType__, status__); \
383 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
386 #define CsrWifiSmeApErrorIndSend(dst__, interfaceTag__, apType__, status__) \
387 CsrWifiSmeApErrorIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, apType__, status__)
389 /*******************************************************************************
392 CsrWifiSmeApStaConnectStartIndSend
395 This primitive indicates that a stations request to join the group/BSS is
399 queue - Destination Task Queue
403 *******************************************************************************/
404 #define CsrWifiSmeApStaConnectStartIndCreate(msg__, dst__, src__, interfaceTag__, peerMacAddress__) \
405 msg__ = (CsrWifiSmeApStaConnectStartInd *) CsrPmemAlloc(sizeof(CsrWifiSmeApStaConnectStartInd)); \
406 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_STA_CONNECT_START_IND, dst__, src__); \
407 msg__->interfaceTag = (interfaceTag__); \
408 msg__->peerMacAddress = (peerMacAddress__);
410 #define CsrWifiSmeApStaConnectStartIndSendTo(dst__, src__, interfaceTag__, peerMacAddress__) \
412 CsrWifiSmeApStaConnectStartInd *msg__; \
413 CsrWifiSmeApStaConnectStartIndCreate(msg__, dst__, src__, interfaceTag__, peerMacAddress__); \
414 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
417 #define CsrWifiSmeApStaConnectStartIndSend(dst__, interfaceTag__, peerMacAddress__) \
418 CsrWifiSmeApStaConnectStartIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, peerMacAddress__)
420 /*******************************************************************************
423 CsrWifiSmeApStaDisconnectReqSend
426 This primitive tells SME to deauth ot disassociate a particular station
430 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
435 keepBlocking - If TRUE, the station is blocked. If FALSE and the station
436 is connected, disconnect the station. If FALSE and the
437 station is not connected, no action is taken.
439 *******************************************************************************/
440 #define CsrWifiSmeApStaDisconnectReqCreate(msg__, dst__, src__, interfaceTag__, deauthReason__, disassocReason__, peerMacaddress__, keepBlocking__) \
441 msg__ = (CsrWifiSmeApStaDisconnectReq *) CsrPmemAlloc(sizeof(CsrWifiSmeApStaDisconnectReq)); \
442 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_STA_DISCONNECT_REQ, dst__, src__); \
443 msg__->interfaceTag = (interfaceTag__); \
444 msg__->deauthReason = (deauthReason__); \
445 msg__->disassocReason = (disassocReason__); \
446 msg__->peerMacaddress = (peerMacaddress__); \
447 msg__->keepBlocking = (keepBlocking__);
449 #define CsrWifiSmeApStaDisconnectReqSendTo(dst__, src__, interfaceTag__, deauthReason__, disassocReason__, peerMacaddress__, keepBlocking__) \
451 CsrWifiSmeApStaDisconnectReq *msg__; \
452 CsrWifiSmeApStaDisconnectReqCreate(msg__, dst__, src__, interfaceTag__, deauthReason__, disassocReason__, peerMacaddress__, keepBlocking__); \
453 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
456 #define CsrWifiSmeApStaDisconnectReqSend(src__, interfaceTag__, deauthReason__, disassocReason__, peerMacaddress__, keepBlocking__) \
457 CsrWifiSmeApStaDisconnectReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__, deauthReason__, disassocReason__, peerMacaddress__, keepBlocking__)
459 /*******************************************************************************
462 CsrWifiSmeApStaDisconnectCfmSend
465 This primitive confirms the station is disconnected
468 queue - Destination Task Queue
473 *******************************************************************************/
474 #define CsrWifiSmeApStaDisconnectCfmCreate(msg__, dst__, src__, interfaceTag__, status__, peerMacaddress__) \
475 msg__ = (CsrWifiSmeApStaDisconnectCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeApStaDisconnectCfm)); \
476 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_STA_DISCONNECT_CFM, dst__, src__); \
477 msg__->interfaceTag = (interfaceTag__); \
478 msg__->status = (status__); \
479 msg__->peerMacaddress = (peerMacaddress__);
481 #define CsrWifiSmeApStaDisconnectCfmSendTo(dst__, src__, interfaceTag__, status__, peerMacaddress__) \
483 CsrWifiSmeApStaDisconnectCfm *msg__; \
484 CsrWifiSmeApStaDisconnectCfmCreate(msg__, dst__, src__, interfaceTag__, status__, peerMacaddress__); \
485 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
488 #define CsrWifiSmeApStaDisconnectCfmSend(dst__, interfaceTag__, status__, peerMacaddress__) \
489 CsrWifiSmeApStaDisconnectCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, peerMacaddress__)
491 /*******************************************************************************
494 CsrWifiSmeApStaNotifyIndSend
497 This primitive indicates that a station has joined or a previously joined
498 station has left the BSS/group
501 queue - Destination Task Queue
514 *******************************************************************************/
515 #define CsrWifiSmeApStaNotifyIndCreate(msg__, dst__, src__, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__, disassocReason__, deauthReason__, WpsRegistration__, secIeLength__, secIe__, groupKeyId__, seqNumber__) \
516 msg__ = (CsrWifiSmeApStaNotifyInd *) CsrPmemAlloc(sizeof(CsrWifiSmeApStaNotifyInd)); \
517 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_STA_NOTIFY_IND, dst__, src__); \
518 msg__->interfaceTag = (interfaceTag__); \
519 msg__->mediaStatus = (mediaStatus__); \
520 msg__->peerMacAddress = (peerMacAddress__); \
521 msg__->peerDeviceAddress = (peerDeviceAddress__); \
522 msg__->disassocReason = (disassocReason__); \
523 msg__->deauthReason = (deauthReason__); \
524 msg__->WpsRegistration = (WpsRegistration__); \
525 msg__->secIeLength = (secIeLength__); \
526 msg__->secIe = (secIe__); \
527 msg__->groupKeyId = (groupKeyId__); \
528 CsrMemCpy(msg__->seqNumber, (seqNumber__), sizeof(CsrUint16) * 8);
530 #define CsrWifiSmeApStaNotifyIndSendTo(dst__, src__, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__, disassocReason__, deauthReason__, WpsRegistration__, secIeLength__, secIe__, groupKeyId__, seqNumber__) \
532 CsrWifiSmeApStaNotifyInd *msg__; \
533 CsrWifiSmeApStaNotifyIndCreate(msg__, dst__, src__, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__, disassocReason__, deauthReason__, WpsRegistration__, secIeLength__, secIe__, groupKeyId__, seqNumber__); \
534 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
537 #define CsrWifiSmeApStaNotifyIndSend(dst__, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__, disassocReason__, deauthReason__, WpsRegistration__, secIeLength__, secIe__, groupKeyId__, seqNumber__) \
538 CsrWifiSmeApStaNotifyIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__, disassocReason__, deauthReason__, WpsRegistration__, secIeLength__, secIe__, groupKeyId__, seqNumber__)
540 /*******************************************************************************
543 CsrWifiSmeApWmmParamUpdateReqSend
546 Application uses this primitive to update the WMM parameters on the fly
549 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
551 wmmApParams - WMM parameters to be used for local firmware queue
553 wmmApBcParams - WMM parameters to be advertised in beacon/probe response
555 *******************************************************************************/
556 #define CsrWifiSmeApWmmParamUpdateReqCreate(msg__, dst__, src__, interfaceTag__, wmmApParams__, wmmApBcParams__) \
557 msg__ = (CsrWifiSmeApWmmParamUpdateReq *) CsrPmemAlloc(sizeof(CsrWifiSmeApWmmParamUpdateReq)); \
558 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WMM_PARAM_UPDATE_REQ, dst__, src__); \
559 msg__->interfaceTag = (interfaceTag__); \
560 CsrMemCpy(msg__->wmmApParams, (wmmApParams__), sizeof(CsrWifiSmeWmmAcParams) * 4); \
561 CsrMemCpy(msg__->wmmApBcParams, (wmmApBcParams__), sizeof(CsrWifiSmeWmmAcParams) * 4);
563 #define CsrWifiSmeApWmmParamUpdateReqSendTo(dst__, src__, interfaceTag__, wmmApParams__, wmmApBcParams__) \
565 CsrWifiSmeApWmmParamUpdateReq *msg__; \
566 CsrWifiSmeApWmmParamUpdateReqCreate(msg__, dst__, src__, interfaceTag__, wmmApParams__, wmmApBcParams__); \
567 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
570 #define CsrWifiSmeApWmmParamUpdateReqSend(src__, interfaceTag__, wmmApParams__, wmmApBcParams__) \
571 CsrWifiSmeApWmmParamUpdateReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__, wmmApParams__, wmmApBcParams__)
573 /*******************************************************************************
576 CsrWifiSmeApWmmParamUpdateCfmSend
579 A confirm for CSR_WIFI_SME_AP_WMM_PARAM_UPDATE.request
582 queue - Destination Task Queue
586 *******************************************************************************/
587 #define CsrWifiSmeApWmmParamUpdateCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
588 msg__ = (CsrWifiSmeApWmmParamUpdateCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeApWmmParamUpdateCfm)); \
589 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WMM_PARAM_UPDATE_CFM, dst__, src__); \
590 msg__->interfaceTag = (interfaceTag__); \
591 msg__->status = (status__);
593 #define CsrWifiSmeApWmmParamUpdateCfmSendTo(dst__, src__, interfaceTag__, status__) \
595 CsrWifiSmeApWmmParamUpdateCfm *msg__; \
596 CsrWifiSmeApWmmParamUpdateCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
597 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
600 #define CsrWifiSmeApWmmParamUpdateCfmSend(dst__, interfaceTag__, status__) \
601 CsrWifiSmeApWmmParamUpdateCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
603 /*******************************************************************************
606 CsrWifiSmeApWpsConfigurationReqSend
609 This primitive passes the WPS information for the device to SME. This may
610 be accepted only if no interface is active.
613 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
614 wpsConfig - WPS config.
616 *******************************************************************************/
617 #define CsrWifiSmeApWpsConfigurationReqCreate(msg__, dst__, src__, wpsConfig__) \
618 msg__ = (CsrWifiSmeApWpsConfigurationReq *) CsrPmemAlloc(sizeof(CsrWifiSmeApWpsConfigurationReq)); \
619 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_CONFIGURATION_REQ, dst__, src__); \
620 msg__->wpsConfig = (wpsConfig__);
622 #define CsrWifiSmeApWpsConfigurationReqSendTo(dst__, src__, wpsConfig__) \
624 CsrWifiSmeApWpsConfigurationReq *msg__; \
625 CsrWifiSmeApWpsConfigurationReqCreate(msg__, dst__, src__, wpsConfig__); \
626 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
629 #define CsrWifiSmeApWpsConfigurationReqSend(src__, wpsConfig__) \
630 CsrWifiSmeApWpsConfigurationReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, wpsConfig__)
632 /*******************************************************************************
635 CsrWifiSmeApWpsConfigurationCfmSend
641 queue - Destination Task Queue
642 status - Status of the request.
644 *******************************************************************************/
645 #define CsrWifiSmeApWpsConfigurationCfmCreate(msg__, dst__, src__, status__) \
646 msg__ = (CsrWifiSmeApWpsConfigurationCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeApWpsConfigurationCfm)); \
647 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_CONFIGURATION_CFM, dst__, src__); \
648 msg__->status = (status__);
650 #define CsrWifiSmeApWpsConfigurationCfmSendTo(dst__, src__, status__) \
652 CsrWifiSmeApWpsConfigurationCfm *msg__; \
653 CsrWifiSmeApWpsConfigurationCfmCreate(msg__, dst__, src__, status__); \
654 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
657 #define CsrWifiSmeApWpsConfigurationCfmSend(dst__, status__) \
658 CsrWifiSmeApWpsConfigurationCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
660 /*******************************************************************************
663 CsrWifiSmeApWpsRegistrationFinishedReqSend
666 This primitive tells SME that WPS registration procedure has finished
669 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
672 *******************************************************************************/
673 #define CsrWifiSmeApWpsRegistrationFinishedReqCreate(msg__, dst__, src__, interfaceTag__) \
674 msg__ = (CsrWifiSmeApWpsRegistrationFinishedReq *) CsrPmemAlloc(sizeof(CsrWifiSmeApWpsRegistrationFinishedReq)); \
675 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_REGISTRATION_FINISHED_REQ, dst__, src__); \
676 msg__->interfaceTag = (interfaceTag__);
678 #define CsrWifiSmeApWpsRegistrationFinishedReqSendTo(dst__, src__, interfaceTag__) \
680 CsrWifiSmeApWpsRegistrationFinishedReq *msg__; \
681 CsrWifiSmeApWpsRegistrationFinishedReqCreate(msg__, dst__, src__, interfaceTag__); \
682 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
685 #define CsrWifiSmeApWpsRegistrationFinishedReqSend(src__, interfaceTag__) \
686 CsrWifiSmeApWpsRegistrationFinishedReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__)
688 /*******************************************************************************
691 CsrWifiSmeApWpsRegistrationFinishedCfmSend
694 A confirm for UNIFI_MGT_AP_WPS_REGISTRATION_FINISHED.request
697 queue - Destination Task Queue
701 *******************************************************************************/
702 #define CsrWifiSmeApWpsRegistrationFinishedCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
703 msg__ = (CsrWifiSmeApWpsRegistrationFinishedCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeApWpsRegistrationFinishedCfm)); \
704 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_REGISTRATION_FINISHED_CFM, dst__, src__); \
705 msg__->interfaceTag = (interfaceTag__); \
706 msg__->status = (status__);
708 #define CsrWifiSmeApWpsRegistrationFinishedCfmSendTo(dst__, src__, interfaceTag__, status__) \
710 CsrWifiSmeApWpsRegistrationFinishedCfm *msg__; \
711 CsrWifiSmeApWpsRegistrationFinishedCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
712 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
715 #define CsrWifiSmeApWpsRegistrationFinishedCfmSend(dst__, interfaceTag__, status__) \
716 CsrWifiSmeApWpsRegistrationFinishedCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
718 /*******************************************************************************
721 CsrWifiSmeApWpsRegistrationStartedReqSend
724 This primitive tells SME that WPS registration procedure has started
727 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
729 SelectedDevicePasswordId -
730 SelectedconfigMethod -
732 *******************************************************************************/
733 #define CsrWifiSmeApWpsRegistrationStartedReqCreate(msg__, dst__, src__, interfaceTag__, SelectedDevicePasswordId__, SelectedconfigMethod__) \
734 msg__ = (CsrWifiSmeApWpsRegistrationStartedReq *) CsrPmemAlloc(sizeof(CsrWifiSmeApWpsRegistrationStartedReq)); \
735 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_REGISTRATION_STARTED_REQ, dst__, src__); \
736 msg__->interfaceTag = (interfaceTag__); \
737 msg__->SelectedDevicePasswordId = (SelectedDevicePasswordId__); \
738 msg__->SelectedconfigMethod = (SelectedconfigMethod__);
740 #define CsrWifiSmeApWpsRegistrationStartedReqSendTo(dst__, src__, interfaceTag__, SelectedDevicePasswordId__, SelectedconfigMethod__) \
742 CsrWifiSmeApWpsRegistrationStartedReq *msg__; \
743 CsrWifiSmeApWpsRegistrationStartedReqCreate(msg__, dst__, src__, interfaceTag__, SelectedDevicePasswordId__, SelectedconfigMethod__); \
744 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
747 #define CsrWifiSmeApWpsRegistrationStartedReqSend(src__, interfaceTag__, SelectedDevicePasswordId__, SelectedconfigMethod__) \
748 CsrWifiSmeApWpsRegistrationStartedReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__, SelectedDevicePasswordId__, SelectedconfigMethod__)
750 /*******************************************************************************
753 CsrWifiSmeApWpsRegistrationStartedCfmSend
756 A confirm for UNIFI_MGT_AP_WPS_REGISTRATION_STARTED.request
759 queue - Destination Task Queue
763 *******************************************************************************/
764 #define CsrWifiSmeApWpsRegistrationStartedCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
765 msg__ = (CsrWifiSmeApWpsRegistrationStartedCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeApWpsRegistrationStartedCfm)); \
766 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_REGISTRATION_STARTED_CFM, dst__, src__); \
767 msg__->interfaceTag = (interfaceTag__); \
768 msg__->status = (status__);
770 #define CsrWifiSmeApWpsRegistrationStartedCfmSendTo(dst__, src__, interfaceTag__, status__) \
772 CsrWifiSmeApWpsRegistrationStartedCfm *msg__; \
773 CsrWifiSmeApWpsRegistrationStartedCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
774 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
777 #define CsrWifiSmeApWpsRegistrationStartedCfmSend(dst__, interfaceTag__, status__) \
778 CsrWifiSmeApWpsRegistrationStartedCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
785 #endif /* CSR_WIFI_SME_AP_LIB_H__ */