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_sched.h"
17 #include "csr_macro.h"
18 #include "csr_msg_transport.h"
20 #include "csr_wifi_lib.h"
22 #include "csr_wifi_sme_ap_prim.h"
23 #include "csr_wifi_sme_task.h"
25 #ifndef CSR_WIFI_AP_ENABLE
26 #error CSR_WIFI_AP_ENABLE MUST be defined inorder to use csr_wifi_sme_ap_lib.h
29 /*----------------------------------------------------------------------------*
30 * CsrWifiSmeApFreeUpstreamMessageContents
33 * Free the allocated memory in a CSR_WIFI_SME_AP upstream message. Does not
34 * free the message itself, and can only be used for upstream messages.
37 * Deallocates the resources in a CSR_WIFI_SME_AP upstream message
38 *----------------------------------------------------------------------------*/
39 void CsrWifiSmeApFreeUpstreamMessageContents(u16 eventClass, void *message);
41 /*----------------------------------------------------------------------------*
42 * CsrWifiSmeApFreeDownstreamMessageContents
45 * Free the allocated memory in a CSR_WIFI_SME_AP downstream message. Does not
46 * free the message itself, and can only be used for downstream messages.
49 * Deallocates the resources in a CSR_WIFI_SME_AP downstream message
50 *----------------------------------------------------------------------------*/
51 void CsrWifiSmeApFreeDownstreamMessageContents(u16 eventClass, void *message);
53 /*----------------------------------------------------------------------------*
54 * Enum to string functions
55 *----------------------------------------------------------------------------*/
56 const char* CsrWifiSmeApAccessTypeToString(CsrWifiSmeApAccessType value);
57 const char* CsrWifiSmeApAuthSupportToString(CsrWifiSmeApAuthSupport value);
58 const char* CsrWifiSmeApAuthTypeToString(CsrWifiSmeApAuthType value);
59 const char* CsrWifiSmeApDirectionToString(CsrWifiSmeApDirection value);
60 const char* CsrWifiSmeApPhySupportToString(CsrWifiSmeApPhySupport value);
61 const char* CsrWifiSmeApTypeToString(CsrWifiSmeApType value);
64 /*----------------------------------------------------------------------------*
65 * CsrPrim Type toString function.
66 * Converts a message type to the String name of the Message
67 *----------------------------------------------------------------------------*/
68 const char* CsrWifiSmeApPrimTypeToString(CsrPrim msgType);
70 /*----------------------------------------------------------------------------*
71 * Lookup arrays for PrimType name Strings
72 *----------------------------------------------------------------------------*/
73 extern const char *CsrWifiSmeApUpstreamPrimNames[CSR_WIFI_SME_AP_PRIM_UPSTREAM_COUNT];
74 extern const char *CsrWifiSmeApDownstreamPrimNames[CSR_WIFI_SME_AP_PRIM_DOWNSTREAM_COUNT];
76 /*******************************************************************************
79 CsrWifiSmeApActiveBaGetReqSend
82 This primitive used to retrieve information related to the active block
86 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
89 *******************************************************************************/
90 #define CsrWifiSmeApActiveBaGetReqCreate(msg__, dst__, src__, interfaceTag__) \
91 msg__ = kmalloc(sizeof(CsrWifiSmeApActiveBaGetReq), GFP_KERNEL); \
92 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_ACTIVE_BA_GET_REQ, dst__, src__); \
93 msg__->interfaceTag = (interfaceTag__);
95 #define CsrWifiSmeApActiveBaGetReqSendTo(dst__, src__, interfaceTag__) \
97 CsrWifiSmeApActiveBaGetReq *msg__; \
98 CsrWifiSmeApActiveBaGetReqCreate(msg__, dst__, src__, interfaceTag__); \
99 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
102 #define CsrWifiSmeApActiveBaGetReqSend(src__, interfaceTag__) \
103 CsrWifiSmeApActiveBaGetReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__)
105 /*******************************************************************************
108 CsrWifiSmeApActiveBaGetCfmSend
111 This primitive carries the information related to the active ba sessions
114 queue - Destination Task Queue
116 status - Reports the result of the request
117 activeBaCount - Number of active block ack session
118 activeBaSessions - Points to a buffer containing an array of
119 CsrWifiSmeApBaSession structures.
121 *******************************************************************************/
122 #define CsrWifiSmeApActiveBaGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, activeBaCount__, activeBaSessions__) \
123 msg__ = kmalloc(sizeof(CsrWifiSmeApActiveBaGetCfm), GFP_KERNEL); \
124 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_ACTIVE_BA_GET_CFM, dst__, src__); \
125 msg__->interfaceTag = (interfaceTag__); \
126 msg__->status = (status__); \
127 msg__->activeBaCount = (activeBaCount__); \
128 msg__->activeBaSessions = (activeBaSessions__);
130 #define CsrWifiSmeApActiveBaGetCfmSendTo(dst__, src__, interfaceTag__, status__, activeBaCount__, activeBaSessions__) \
132 CsrWifiSmeApActiveBaGetCfm *msg__; \
133 CsrWifiSmeApActiveBaGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, activeBaCount__, activeBaSessions__); \
134 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
137 #define CsrWifiSmeApActiveBaGetCfmSend(dst__, interfaceTag__, status__, activeBaCount__, activeBaSessions__) \
138 CsrWifiSmeApActiveBaGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, activeBaCount__, activeBaSessions__)
140 /*******************************************************************************
143 CsrWifiSmeApBaDeleteReqSend
146 This primitive is used to delete an active block ack session
149 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
152 baSession - BA session to be deleted
154 *******************************************************************************/
155 #define CsrWifiSmeApBaDeleteReqCreate(msg__, dst__, src__, interfaceTag__, reason__, baSession__) \
156 msg__ = kmalloc(sizeof(CsrWifiSmeApBaDeleteReq), GFP_KERNEL); \
157 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BA_DELETE_REQ, dst__, src__); \
158 msg__->interfaceTag = (interfaceTag__); \
159 msg__->reason = (reason__); \
160 msg__->baSession = (baSession__);
162 #define CsrWifiSmeApBaDeleteReqSendTo(dst__, src__, interfaceTag__, reason__, baSession__) \
164 CsrWifiSmeApBaDeleteReq *msg__; \
165 CsrWifiSmeApBaDeleteReqCreate(msg__, dst__, src__, interfaceTag__, reason__, baSession__); \
166 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
169 #define CsrWifiSmeApBaDeleteReqSend(src__, interfaceTag__, reason__, baSession__) \
170 CsrWifiSmeApBaDeleteReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__, reason__, baSession__)
172 /*******************************************************************************
175 CsrWifiSmeApBaDeleteCfmSend
178 This primitive confirms the BA is deleted
181 queue - Destination Task Queue
183 status - Reports the result of the request
184 baSession - deleted BA session
186 *******************************************************************************/
187 #define CsrWifiSmeApBaDeleteCfmCreate(msg__, dst__, src__, interfaceTag__, status__, baSession__) \
188 msg__ = kmalloc(sizeof(CsrWifiSmeApBaDeleteCfm), GFP_KERNEL); \
189 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BA_DELETE_CFM, dst__, src__); \
190 msg__->interfaceTag = (interfaceTag__); \
191 msg__->status = (status__); \
192 msg__->baSession = (baSession__);
194 #define CsrWifiSmeApBaDeleteCfmSendTo(dst__, src__, interfaceTag__, status__, baSession__) \
196 CsrWifiSmeApBaDeleteCfm *msg__; \
197 CsrWifiSmeApBaDeleteCfmCreate(msg__, dst__, src__, interfaceTag__, status__, baSession__); \
198 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
201 #define CsrWifiSmeApBaDeleteCfmSend(dst__, interfaceTag__, status__, baSession__) \
202 CsrWifiSmeApBaDeleteCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, baSession__)
204 /*******************************************************************************
207 CsrWifiSmeApBeaconingStartReqSend
210 This primitive requests the SME to start AP or GO functionality
213 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
215 initialPresence - Set to 0, if Not in a group fomration phase, set to 1 ,
216 during group formation phase
217 apType - apType : Legacy AP or P2PGO
218 cloakSsid - cloakSsid flag.
220 ifIndex - Radio Interface
222 maxConnections - Maximum Stations + P2PClients allowed
223 apCredentials - AP security credeitals used to advertise in beacon /probe
225 smeApConfig - AP configuration
226 p2pGoParam - P2P specific GO parameters. Ignored if it is a leagacy AP
228 *******************************************************************************/
229 #define CsrWifiSmeApBeaconingStartReqCreate(msg__, dst__, src__, interfaceTag__, initialPresence__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, maxConnections__, apCredentials__, smeApConfig__, p2pGoParam__) \
230 msg__ = kmalloc(sizeof(CsrWifiSmeApBeaconingStartReq), GFP_KERNEL); \
231 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BEACONING_START_REQ, dst__, src__); \
232 msg__->interfaceTag = (interfaceTag__); \
233 msg__->initialPresence = (initialPresence__); \
234 msg__->apType = (apType__); \
235 msg__->cloakSsid = (cloakSsid__); \
236 msg__->ssid = (ssid__); \
237 msg__->ifIndex = (ifIndex__); \
238 msg__->channel = (channel__); \
239 msg__->maxConnections = (maxConnections__); \
240 msg__->apCredentials = (apCredentials__); \
241 msg__->smeApConfig = (smeApConfig__); \
242 msg__->p2pGoParam = (p2pGoParam__);
244 #define CsrWifiSmeApBeaconingStartReqSendTo(dst__, src__, interfaceTag__, initialPresence__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, maxConnections__, apCredentials__, smeApConfig__, p2pGoParam__) \
246 CsrWifiSmeApBeaconingStartReq *msg__; \
247 CsrWifiSmeApBeaconingStartReqCreate(msg__, dst__, src__, interfaceTag__, initialPresence__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, maxConnections__, apCredentials__, smeApConfig__, p2pGoParam__); \
248 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
251 #define CsrWifiSmeApBeaconingStartReqSend(src__, interfaceTag__, initialPresence__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, maxConnections__, apCredentials__, smeApConfig__, p2pGoParam__) \
252 CsrWifiSmeApBeaconingStartReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__, initialPresence__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, maxConnections__, apCredentials__, smeApConfig__, p2pGoParam__)
254 /*******************************************************************************
257 CsrWifiSmeApBeaconingStartCfmSend
260 This primitive confirms the completion of the request along with the
264 queue - Destination Task Queue
270 *******************************************************************************/
271 #define CsrWifiSmeApBeaconingStartCfmCreate(msg__, dst__, src__, interfaceTag__, status__, secIeLength__, secIe__) \
272 msg__ = kmalloc(sizeof(CsrWifiSmeApBeaconingStartCfm), GFP_KERNEL); \
273 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BEACONING_START_CFM, dst__, src__); \
274 msg__->interfaceTag = (interfaceTag__); \
275 msg__->status = (status__); \
276 msg__->secIeLength = (secIeLength__); \
277 msg__->secIe = (secIe__);
279 #define CsrWifiSmeApBeaconingStartCfmSendTo(dst__, src__, interfaceTag__, status__, secIeLength__, secIe__) \
281 CsrWifiSmeApBeaconingStartCfm *msg__; \
282 CsrWifiSmeApBeaconingStartCfmCreate(msg__, dst__, src__, interfaceTag__, status__, secIeLength__, secIe__); \
283 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
286 #define CsrWifiSmeApBeaconingStartCfmSend(dst__, interfaceTag__, status__, secIeLength__, secIe__) \
287 CsrWifiSmeApBeaconingStartCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, secIeLength__, secIe__)
289 /*******************************************************************************
292 CsrWifiSmeApBeaconingStopReqSend
295 This primitive requests the SME to STOP AP or P2PGO operation
298 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
301 *******************************************************************************/
302 #define CsrWifiSmeApBeaconingStopReqCreate(msg__, dst__, src__, interfaceTag__) \
303 msg__ = kmalloc(sizeof(CsrWifiSmeApBeaconingStopReq), GFP_KERNEL); \
304 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BEACONING_STOP_REQ, dst__, src__); \
305 msg__->interfaceTag = (interfaceTag__);
307 #define CsrWifiSmeApBeaconingStopReqSendTo(dst__, src__, interfaceTag__) \
309 CsrWifiSmeApBeaconingStopReq *msg__; \
310 CsrWifiSmeApBeaconingStopReqCreate(msg__, dst__, src__, interfaceTag__); \
311 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
314 #define CsrWifiSmeApBeaconingStopReqSend(src__, interfaceTag__) \
315 CsrWifiSmeApBeaconingStopReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__)
317 /*******************************************************************************
320 CsrWifiSmeApBeaconingStopCfmSend
323 This primitive confirms AP or P2PGO operation is terminated
326 queue - Destination Task Queue
330 *******************************************************************************/
331 #define CsrWifiSmeApBeaconingStopCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
332 msg__ = kmalloc(sizeof(CsrWifiSmeApBeaconingStopCfm), GFP_KERNEL); \
333 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BEACONING_STOP_CFM, dst__, src__); \
334 msg__->interfaceTag = (interfaceTag__); \
335 msg__->status = (status__);
337 #define CsrWifiSmeApBeaconingStopCfmSendTo(dst__, src__, interfaceTag__, status__) \
339 CsrWifiSmeApBeaconingStopCfm *msg__; \
340 CsrWifiSmeApBeaconingStopCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
341 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
344 #define CsrWifiSmeApBeaconingStopCfmSend(dst__, interfaceTag__, status__) \
345 CsrWifiSmeApBeaconingStopCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
347 /*******************************************************************************
350 CsrWifiSmeApErrorIndSend
353 This primitve is sent by SME to indicate some error in AP operationi
354 after AP operations were started successfully and continuing the AP
355 operation may lead to undesired behaviour. It is the responsibility of
356 the upper layers to stop AP operation if needed
359 queue - Destination Task Queue
360 interfaceTag - Range 0-1
362 status - Contains the error status
364 *******************************************************************************/
365 #define CsrWifiSmeApErrorIndCreate(msg__, dst__, src__, interfaceTag__, apType__, status__) \
366 msg__ = kmalloc(sizeof(CsrWifiSmeApErrorInd), GFP_KERNEL); \
367 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_ERROR_IND, dst__, src__); \
368 msg__->interfaceTag = (interfaceTag__); \
369 msg__->apType = (apType__); \
370 msg__->status = (status__);
372 #define CsrWifiSmeApErrorIndSendTo(dst__, src__, interfaceTag__, apType__, status__) \
374 CsrWifiSmeApErrorInd *msg__; \
375 CsrWifiSmeApErrorIndCreate(msg__, dst__, src__, interfaceTag__, apType__, status__); \
376 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
379 #define CsrWifiSmeApErrorIndSend(dst__, interfaceTag__, apType__, status__) \
380 CsrWifiSmeApErrorIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, apType__, status__)
382 /*******************************************************************************
385 CsrWifiSmeApStaConnectStartIndSend
388 This primitive indicates that a stations request to join the group/BSS is
392 queue - Destination Task Queue
396 *******************************************************************************/
397 #define CsrWifiSmeApStaConnectStartIndCreate(msg__, dst__, src__, interfaceTag__, peerMacAddress__) \
398 msg__ = kmalloc(sizeof(CsrWifiSmeApStaConnectStartInd), GFP_KERNEL); \
399 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_STA_CONNECT_START_IND, dst__, src__); \
400 msg__->interfaceTag = (interfaceTag__); \
401 msg__->peerMacAddress = (peerMacAddress__);
403 #define CsrWifiSmeApStaConnectStartIndSendTo(dst__, src__, interfaceTag__, peerMacAddress__) \
405 CsrWifiSmeApStaConnectStartInd *msg__; \
406 CsrWifiSmeApStaConnectStartIndCreate(msg__, dst__, src__, interfaceTag__, peerMacAddress__); \
407 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
410 #define CsrWifiSmeApStaConnectStartIndSend(dst__, interfaceTag__, peerMacAddress__) \
411 CsrWifiSmeApStaConnectStartIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, peerMacAddress__)
413 /*******************************************************************************
416 CsrWifiSmeApStaDisconnectReqSend
419 This primitive tells SME to deauth ot disassociate a particular station
423 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
428 keepBlocking - If TRUE, the station is blocked. If FALSE and the station
429 is connected, disconnect the station. If FALSE and the
430 station is not connected, no action is taken.
432 *******************************************************************************/
433 #define CsrWifiSmeApStaDisconnectReqCreate(msg__, dst__, src__, interfaceTag__, deauthReason__, disassocReason__, peerMacaddress__, keepBlocking__) \
434 msg__ = kmalloc(sizeof(CsrWifiSmeApStaDisconnectReq), GFP_KERNEL); \
435 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_STA_DISCONNECT_REQ, dst__, src__); \
436 msg__->interfaceTag = (interfaceTag__); \
437 msg__->deauthReason = (deauthReason__); \
438 msg__->disassocReason = (disassocReason__); \
439 msg__->peerMacaddress = (peerMacaddress__); \
440 msg__->keepBlocking = (keepBlocking__);
442 #define CsrWifiSmeApStaDisconnectReqSendTo(dst__, src__, interfaceTag__, deauthReason__, disassocReason__, peerMacaddress__, keepBlocking__) \
444 CsrWifiSmeApStaDisconnectReq *msg__; \
445 CsrWifiSmeApStaDisconnectReqCreate(msg__, dst__, src__, interfaceTag__, deauthReason__, disassocReason__, peerMacaddress__, keepBlocking__); \
446 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
449 #define CsrWifiSmeApStaDisconnectReqSend(src__, interfaceTag__, deauthReason__, disassocReason__, peerMacaddress__, keepBlocking__) \
450 CsrWifiSmeApStaDisconnectReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__, deauthReason__, disassocReason__, peerMacaddress__, keepBlocking__)
452 /*******************************************************************************
455 CsrWifiSmeApStaDisconnectCfmSend
458 This primitive confirms the station is disconnected
461 queue - Destination Task Queue
466 *******************************************************************************/
467 #define CsrWifiSmeApStaDisconnectCfmCreate(msg__, dst__, src__, interfaceTag__, status__, peerMacaddress__) \
468 msg__ = kmalloc(sizeof(CsrWifiSmeApStaDisconnectCfm), GFP_KERNEL); \
469 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_STA_DISCONNECT_CFM, dst__, src__); \
470 msg__->interfaceTag = (interfaceTag__); \
471 msg__->status = (status__); \
472 msg__->peerMacaddress = (peerMacaddress__);
474 #define CsrWifiSmeApStaDisconnectCfmSendTo(dst__, src__, interfaceTag__, status__, peerMacaddress__) \
476 CsrWifiSmeApStaDisconnectCfm *msg__; \
477 CsrWifiSmeApStaDisconnectCfmCreate(msg__, dst__, src__, interfaceTag__, status__, peerMacaddress__); \
478 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
481 #define CsrWifiSmeApStaDisconnectCfmSend(dst__, interfaceTag__, status__, peerMacaddress__) \
482 CsrWifiSmeApStaDisconnectCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, peerMacaddress__)
484 /*******************************************************************************
487 CsrWifiSmeApStaNotifyIndSend
490 This primitive indicates that a station has joined or a previously joined
491 station has left the BSS/group
494 queue - Destination Task Queue
507 *******************************************************************************/
508 #define CsrWifiSmeApStaNotifyIndCreate(msg__, dst__, src__, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__, disassocReason__, deauthReason__, WpsRegistration__, secIeLength__, secIe__, groupKeyId__, seqNumber__) \
509 msg__ = kmalloc(sizeof(CsrWifiSmeApStaNotifyInd), GFP_KERNEL); \
510 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_STA_NOTIFY_IND, dst__, src__); \
511 msg__->interfaceTag = (interfaceTag__); \
512 msg__->mediaStatus = (mediaStatus__); \
513 msg__->peerMacAddress = (peerMacAddress__); \
514 msg__->peerDeviceAddress = (peerDeviceAddress__); \
515 msg__->disassocReason = (disassocReason__); \
516 msg__->deauthReason = (deauthReason__); \
517 msg__->WpsRegistration = (WpsRegistration__); \
518 msg__->secIeLength = (secIeLength__); \
519 msg__->secIe = (secIe__); \
520 msg__->groupKeyId = (groupKeyId__); \
521 memcpy(msg__->seqNumber, (seqNumber__), sizeof(u16) * 8);
523 #define CsrWifiSmeApStaNotifyIndSendTo(dst__, src__, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__, disassocReason__, deauthReason__, WpsRegistration__, secIeLength__, secIe__, groupKeyId__, seqNumber__) \
525 CsrWifiSmeApStaNotifyInd *msg__; \
526 CsrWifiSmeApStaNotifyIndCreate(msg__, dst__, src__, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__, disassocReason__, deauthReason__, WpsRegistration__, secIeLength__, secIe__, groupKeyId__, seqNumber__); \
527 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
530 #define CsrWifiSmeApStaNotifyIndSend(dst__, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__, disassocReason__, deauthReason__, WpsRegistration__, secIeLength__, secIe__, groupKeyId__, seqNumber__) \
531 CsrWifiSmeApStaNotifyIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__, disassocReason__, deauthReason__, WpsRegistration__, secIeLength__, secIe__, groupKeyId__, seqNumber__)
533 /*******************************************************************************
536 CsrWifiSmeApWmmParamUpdateReqSend
539 Application uses this primitive to update the WMM parameters on the fly
542 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
544 wmmApParams - WMM parameters to be used for local firmware queue
546 wmmApBcParams - WMM parameters to be advertised in beacon/probe response
548 *******************************************************************************/
549 #define CsrWifiSmeApWmmParamUpdateReqCreate(msg__, dst__, src__, interfaceTag__, wmmApParams__, wmmApBcParams__) \
550 msg__ = kmalloc(sizeof(CsrWifiSmeApWmmParamUpdateReq), GFP_KERNEL); \
551 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WMM_PARAM_UPDATE_REQ, dst__, src__); \
552 msg__->interfaceTag = (interfaceTag__); \
553 memcpy(msg__->wmmApParams, (wmmApParams__), sizeof(CsrWifiSmeWmmAcParams) * 4); \
554 memcpy(msg__->wmmApBcParams, (wmmApBcParams__), sizeof(CsrWifiSmeWmmAcParams) * 4);
556 #define CsrWifiSmeApWmmParamUpdateReqSendTo(dst__, src__, interfaceTag__, wmmApParams__, wmmApBcParams__) \
558 CsrWifiSmeApWmmParamUpdateReq *msg__; \
559 CsrWifiSmeApWmmParamUpdateReqCreate(msg__, dst__, src__, interfaceTag__, wmmApParams__, wmmApBcParams__); \
560 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
563 #define CsrWifiSmeApWmmParamUpdateReqSend(src__, interfaceTag__, wmmApParams__, wmmApBcParams__) \
564 CsrWifiSmeApWmmParamUpdateReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__, wmmApParams__, wmmApBcParams__)
566 /*******************************************************************************
569 CsrWifiSmeApWmmParamUpdateCfmSend
572 A confirm for CSR_WIFI_SME_AP_WMM_PARAM_UPDATE.request
575 queue - Destination Task Queue
579 *******************************************************************************/
580 #define CsrWifiSmeApWmmParamUpdateCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
581 msg__ = kmalloc(sizeof(CsrWifiSmeApWmmParamUpdateCfm), GFP_KERNEL); \
582 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WMM_PARAM_UPDATE_CFM, dst__, src__); \
583 msg__->interfaceTag = (interfaceTag__); \
584 msg__->status = (status__);
586 #define CsrWifiSmeApWmmParamUpdateCfmSendTo(dst__, src__, interfaceTag__, status__) \
588 CsrWifiSmeApWmmParamUpdateCfm *msg__; \
589 CsrWifiSmeApWmmParamUpdateCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
590 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
593 #define CsrWifiSmeApWmmParamUpdateCfmSend(dst__, interfaceTag__, status__) \
594 CsrWifiSmeApWmmParamUpdateCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
596 /*******************************************************************************
599 CsrWifiSmeApWpsConfigurationReqSend
602 This primitive passes the WPS information for the device to SME. This may
603 be accepted only if no interface is active.
606 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
607 wpsConfig - WPS config.
609 *******************************************************************************/
610 #define CsrWifiSmeApWpsConfigurationReqCreate(msg__, dst__, src__, wpsConfig__) \
611 msg__ = kmalloc(sizeof(CsrWifiSmeApWpsConfigurationReq), GFP_KERNEL); \
612 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_CONFIGURATION_REQ, dst__, src__); \
613 msg__->wpsConfig = (wpsConfig__);
615 #define CsrWifiSmeApWpsConfigurationReqSendTo(dst__, src__, wpsConfig__) \
617 CsrWifiSmeApWpsConfigurationReq *msg__; \
618 CsrWifiSmeApWpsConfigurationReqCreate(msg__, dst__, src__, wpsConfig__); \
619 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
622 #define CsrWifiSmeApWpsConfigurationReqSend(src__, wpsConfig__) \
623 CsrWifiSmeApWpsConfigurationReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, wpsConfig__)
625 /*******************************************************************************
628 CsrWifiSmeApWpsConfigurationCfmSend
634 queue - Destination Task Queue
635 status - Status of the request.
637 *******************************************************************************/
638 #define CsrWifiSmeApWpsConfigurationCfmCreate(msg__, dst__, src__, status__) \
639 msg__ = kmalloc(sizeof(CsrWifiSmeApWpsConfigurationCfm), GFP_KERNEL); \
640 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_CONFIGURATION_CFM, dst__, src__); \
641 msg__->status = (status__);
643 #define CsrWifiSmeApWpsConfigurationCfmSendTo(dst__, src__, status__) \
645 CsrWifiSmeApWpsConfigurationCfm *msg__; \
646 CsrWifiSmeApWpsConfigurationCfmCreate(msg__, dst__, src__, status__); \
647 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
650 #define CsrWifiSmeApWpsConfigurationCfmSend(dst__, status__) \
651 CsrWifiSmeApWpsConfigurationCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
653 /*******************************************************************************
656 CsrWifiSmeApWpsRegistrationFinishedReqSend
659 This primitive tells SME that WPS registration procedure has finished
662 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
665 *******************************************************************************/
666 #define CsrWifiSmeApWpsRegistrationFinishedReqCreate(msg__, dst__, src__, interfaceTag__) \
667 msg__ = kmalloc(sizeof(CsrWifiSmeApWpsRegistrationFinishedReq), GFP_KERNEL); \
668 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_REGISTRATION_FINISHED_REQ, dst__, src__); \
669 msg__->interfaceTag = (interfaceTag__);
671 #define CsrWifiSmeApWpsRegistrationFinishedReqSendTo(dst__, src__, interfaceTag__) \
673 CsrWifiSmeApWpsRegistrationFinishedReq *msg__; \
674 CsrWifiSmeApWpsRegistrationFinishedReqCreate(msg__, dst__, src__, interfaceTag__); \
675 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
678 #define CsrWifiSmeApWpsRegistrationFinishedReqSend(src__, interfaceTag__) \
679 CsrWifiSmeApWpsRegistrationFinishedReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__)
681 /*******************************************************************************
684 CsrWifiSmeApWpsRegistrationFinishedCfmSend
687 A confirm for UNIFI_MGT_AP_WPS_REGISTRATION_FINISHED.request
690 queue - Destination Task Queue
694 *******************************************************************************/
695 #define CsrWifiSmeApWpsRegistrationFinishedCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
696 msg__ = kmalloc(sizeof(CsrWifiSmeApWpsRegistrationFinishedCfm), GFP_KERNEL); \
697 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_REGISTRATION_FINISHED_CFM, dst__, src__); \
698 msg__->interfaceTag = (interfaceTag__); \
699 msg__->status = (status__);
701 #define CsrWifiSmeApWpsRegistrationFinishedCfmSendTo(dst__, src__, interfaceTag__, status__) \
703 CsrWifiSmeApWpsRegistrationFinishedCfm *msg__; \
704 CsrWifiSmeApWpsRegistrationFinishedCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
705 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
708 #define CsrWifiSmeApWpsRegistrationFinishedCfmSend(dst__, interfaceTag__, status__) \
709 CsrWifiSmeApWpsRegistrationFinishedCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
711 /*******************************************************************************
714 CsrWifiSmeApWpsRegistrationStartedReqSend
717 This primitive tells SME that WPS registration procedure has started
720 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
722 SelectedDevicePasswordId -
723 SelectedconfigMethod -
725 *******************************************************************************/
726 #define CsrWifiSmeApWpsRegistrationStartedReqCreate(msg__, dst__, src__, interfaceTag__, SelectedDevicePasswordId__, SelectedconfigMethod__) \
727 msg__ = kmalloc(sizeof(CsrWifiSmeApWpsRegistrationStartedReq), GFP_KERNEL); \
728 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_REGISTRATION_STARTED_REQ, dst__, src__); \
729 msg__->interfaceTag = (interfaceTag__); \
730 msg__->SelectedDevicePasswordId = (SelectedDevicePasswordId__); \
731 msg__->SelectedconfigMethod = (SelectedconfigMethod__);
733 #define CsrWifiSmeApWpsRegistrationStartedReqSendTo(dst__, src__, interfaceTag__, SelectedDevicePasswordId__, SelectedconfigMethod__) \
735 CsrWifiSmeApWpsRegistrationStartedReq *msg__; \
736 CsrWifiSmeApWpsRegistrationStartedReqCreate(msg__, dst__, src__, interfaceTag__, SelectedDevicePasswordId__, SelectedconfigMethod__); \
737 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
740 #define CsrWifiSmeApWpsRegistrationStartedReqSend(src__, interfaceTag__, SelectedDevicePasswordId__, SelectedconfigMethod__) \
741 CsrWifiSmeApWpsRegistrationStartedReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__, SelectedDevicePasswordId__, SelectedconfigMethod__)
743 /*******************************************************************************
746 CsrWifiSmeApWpsRegistrationStartedCfmSend
749 A confirm for UNIFI_MGT_AP_WPS_REGISTRATION_STARTED.request
752 queue - Destination Task Queue
756 *******************************************************************************/
757 #define CsrWifiSmeApWpsRegistrationStartedCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
758 msg__ = kmalloc(sizeof(CsrWifiSmeApWpsRegistrationStartedCfm), GFP_KERNEL); \
759 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_REGISTRATION_STARTED_CFM, dst__, src__); \
760 msg__->interfaceTag = (interfaceTag__); \
761 msg__->status = (status__);
763 #define CsrWifiSmeApWpsRegistrationStartedCfmSendTo(dst__, src__, interfaceTag__, status__) \
765 CsrWifiSmeApWpsRegistrationStartedCfm *msg__; \
766 CsrWifiSmeApWpsRegistrationStartedCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
767 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
770 #define CsrWifiSmeApWpsRegistrationStartedCfmSend(dst__, interfaceTag__, status__) \
771 CsrWifiSmeApWpsRegistrationStartedCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
774 #endif /* CSR_WIFI_SME_AP_LIB_H__ */