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__
17 #include "csr_sched.h"
18 #include "csr_macro.h"
19 #include "csr_msg_transport.h"
21 #include "csr_wifi_lib.h"
23 #include "csr_wifi_sme_ap_prim.h"
24 #include "csr_wifi_sme_task.h"
31 #ifndef CSR_WIFI_AP_ENABLE
32 #error CSR_WIFI_AP_ENABLE MUST be defined inorder to use csr_wifi_sme_ap_lib.h
35 /*----------------------------------------------------------------------------*
36 * CsrWifiSmeApFreeUpstreamMessageContents
39 * Free the allocated memory in a CSR_WIFI_SME_AP upstream message. Does not
40 * free the message itself, and can only be used for upstream messages.
43 * Deallocates the resources in a CSR_WIFI_SME_AP upstream message
44 *----------------------------------------------------------------------------*/
45 void CsrWifiSmeApFreeUpstreamMessageContents(u16 eventClass, void *message);
47 /*----------------------------------------------------------------------------*
48 * CsrWifiSmeApFreeDownstreamMessageContents
51 * Free the allocated memory in a CSR_WIFI_SME_AP downstream message. Does not
52 * free the message itself, and can only be used for downstream messages.
55 * Deallocates the resources in a CSR_WIFI_SME_AP downstream message
56 *----------------------------------------------------------------------------*/
57 void CsrWifiSmeApFreeDownstreamMessageContents(u16 eventClass, void *message);
59 /*----------------------------------------------------------------------------*
60 * Enum to string functions
61 *----------------------------------------------------------------------------*/
62 const char* CsrWifiSmeApAccessTypeToString(CsrWifiSmeApAccessType value);
63 const char* CsrWifiSmeApAuthSupportToString(CsrWifiSmeApAuthSupport value);
64 const char* CsrWifiSmeApAuthTypeToString(CsrWifiSmeApAuthType value);
65 const char* CsrWifiSmeApDirectionToString(CsrWifiSmeApDirection value);
66 const char* CsrWifiSmeApPhySupportToString(CsrWifiSmeApPhySupport value);
67 const char* CsrWifiSmeApTypeToString(CsrWifiSmeApType value);
70 /*----------------------------------------------------------------------------*
71 * CsrPrim Type toString function.
72 * Converts a message type to the String name of the Message
73 *----------------------------------------------------------------------------*/
74 const char* CsrWifiSmeApPrimTypeToString(CsrPrim msgType);
76 /*----------------------------------------------------------------------------*
77 * Lookup arrays for PrimType name Strings
78 *----------------------------------------------------------------------------*/
79 extern const char *CsrWifiSmeApUpstreamPrimNames[CSR_WIFI_SME_AP_PRIM_UPSTREAM_COUNT];
80 extern const char *CsrWifiSmeApDownstreamPrimNames[CSR_WIFI_SME_AP_PRIM_DOWNSTREAM_COUNT];
82 /*******************************************************************************
85 CsrWifiSmeApActiveBaGetReqSend
88 This primitive used to retrieve information related to the active block
92 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
95 *******************************************************************************/
96 #define CsrWifiSmeApActiveBaGetReqCreate(msg__, dst__, src__, interfaceTag__) \
97 msg__ = kmalloc(sizeof(CsrWifiSmeApActiveBaGetReq), GFP_KERNEL); \
98 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_ACTIVE_BA_GET_REQ, dst__, src__); \
99 msg__->interfaceTag = (interfaceTag__);
101 #define CsrWifiSmeApActiveBaGetReqSendTo(dst__, src__, interfaceTag__) \
103 CsrWifiSmeApActiveBaGetReq *msg__; \
104 CsrWifiSmeApActiveBaGetReqCreate(msg__, dst__, src__, interfaceTag__); \
105 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
108 #define CsrWifiSmeApActiveBaGetReqSend(src__, interfaceTag__) \
109 CsrWifiSmeApActiveBaGetReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__)
111 /*******************************************************************************
114 CsrWifiSmeApActiveBaGetCfmSend
117 This primitive carries the information related to the active ba sessions
120 queue - Destination Task Queue
122 status - Reports the result of the request
123 activeBaCount - Number of active block ack session
124 activeBaSessions - Points to a buffer containing an array of
125 CsrWifiSmeApBaSession structures.
127 *******************************************************************************/
128 #define CsrWifiSmeApActiveBaGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, activeBaCount__, activeBaSessions__) \
129 msg__ = kmalloc(sizeof(CsrWifiSmeApActiveBaGetCfm), GFP_KERNEL); \
130 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_ACTIVE_BA_GET_CFM, dst__, src__); \
131 msg__->interfaceTag = (interfaceTag__); \
132 msg__->status = (status__); \
133 msg__->activeBaCount = (activeBaCount__); \
134 msg__->activeBaSessions = (activeBaSessions__);
136 #define CsrWifiSmeApActiveBaGetCfmSendTo(dst__, src__, interfaceTag__, status__, activeBaCount__, activeBaSessions__) \
138 CsrWifiSmeApActiveBaGetCfm *msg__; \
139 CsrWifiSmeApActiveBaGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, activeBaCount__, activeBaSessions__); \
140 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
143 #define CsrWifiSmeApActiveBaGetCfmSend(dst__, interfaceTag__, status__, activeBaCount__, activeBaSessions__) \
144 CsrWifiSmeApActiveBaGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, activeBaCount__, activeBaSessions__)
146 /*******************************************************************************
149 CsrWifiSmeApBaDeleteReqSend
152 This primitive is used to delete an active block ack session
155 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
158 baSession - BA session to be deleted
160 *******************************************************************************/
161 #define CsrWifiSmeApBaDeleteReqCreate(msg__, dst__, src__, interfaceTag__, reason__, baSession__) \
162 msg__ = kmalloc(sizeof(CsrWifiSmeApBaDeleteReq), GFP_KERNEL); \
163 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BA_DELETE_REQ, dst__, src__); \
164 msg__->interfaceTag = (interfaceTag__); \
165 msg__->reason = (reason__); \
166 msg__->baSession = (baSession__);
168 #define CsrWifiSmeApBaDeleteReqSendTo(dst__, src__, interfaceTag__, reason__, baSession__) \
170 CsrWifiSmeApBaDeleteReq *msg__; \
171 CsrWifiSmeApBaDeleteReqCreate(msg__, dst__, src__, interfaceTag__, reason__, baSession__); \
172 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
175 #define CsrWifiSmeApBaDeleteReqSend(src__, interfaceTag__, reason__, baSession__) \
176 CsrWifiSmeApBaDeleteReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__, reason__, baSession__)
178 /*******************************************************************************
181 CsrWifiSmeApBaDeleteCfmSend
184 This primitive confirms the BA is deleted
187 queue - Destination Task Queue
189 status - Reports the result of the request
190 baSession - deleted BA session
192 *******************************************************************************/
193 #define CsrWifiSmeApBaDeleteCfmCreate(msg__, dst__, src__, interfaceTag__, status__, baSession__) \
194 msg__ = kmalloc(sizeof(CsrWifiSmeApBaDeleteCfm), GFP_KERNEL); \
195 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BA_DELETE_CFM, dst__, src__); \
196 msg__->interfaceTag = (interfaceTag__); \
197 msg__->status = (status__); \
198 msg__->baSession = (baSession__);
200 #define CsrWifiSmeApBaDeleteCfmSendTo(dst__, src__, interfaceTag__, status__, baSession__) \
202 CsrWifiSmeApBaDeleteCfm *msg__; \
203 CsrWifiSmeApBaDeleteCfmCreate(msg__, dst__, src__, interfaceTag__, status__, baSession__); \
204 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
207 #define CsrWifiSmeApBaDeleteCfmSend(dst__, interfaceTag__, status__, baSession__) \
208 CsrWifiSmeApBaDeleteCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, baSession__)
210 /*******************************************************************************
213 CsrWifiSmeApBeaconingStartReqSend
216 This primitive requests the SME to start AP or GO functionality
219 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
221 initialPresence - Set to 0, if Not in a group fomration phase, set to 1 ,
222 during group formation phase
223 apType - apType : Legacy AP or P2PGO
224 cloakSsid - cloakSsid flag.
226 ifIndex - Radio Interface
228 maxConnections - Maximum Stations + P2PClients allowed
229 apCredentials - AP security credeitals used to advertise in beacon /probe
231 smeApConfig - AP configuration
232 p2pGoParam - P2P specific GO parameters. Ignored if it is a leagacy AP
234 *******************************************************************************/
235 #define CsrWifiSmeApBeaconingStartReqCreate(msg__, dst__, src__, interfaceTag__, initialPresence__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, maxConnections__, apCredentials__, smeApConfig__, p2pGoParam__) \
236 msg__ = kmalloc(sizeof(CsrWifiSmeApBeaconingStartReq), GFP_KERNEL); \
237 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BEACONING_START_REQ, dst__, src__); \
238 msg__->interfaceTag = (interfaceTag__); \
239 msg__->initialPresence = (initialPresence__); \
240 msg__->apType = (apType__); \
241 msg__->cloakSsid = (cloakSsid__); \
242 msg__->ssid = (ssid__); \
243 msg__->ifIndex = (ifIndex__); \
244 msg__->channel = (channel__); \
245 msg__->maxConnections = (maxConnections__); \
246 msg__->apCredentials = (apCredentials__); \
247 msg__->smeApConfig = (smeApConfig__); \
248 msg__->p2pGoParam = (p2pGoParam__);
250 #define CsrWifiSmeApBeaconingStartReqSendTo(dst__, src__, interfaceTag__, initialPresence__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, maxConnections__, apCredentials__, smeApConfig__, p2pGoParam__) \
252 CsrWifiSmeApBeaconingStartReq *msg__; \
253 CsrWifiSmeApBeaconingStartReqCreate(msg__, dst__, src__, interfaceTag__, initialPresence__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, maxConnections__, apCredentials__, smeApConfig__, p2pGoParam__); \
254 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
257 #define CsrWifiSmeApBeaconingStartReqSend(src__, interfaceTag__, initialPresence__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, maxConnections__, apCredentials__, smeApConfig__, p2pGoParam__) \
258 CsrWifiSmeApBeaconingStartReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__, initialPresence__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, maxConnections__, apCredentials__, smeApConfig__, p2pGoParam__)
260 /*******************************************************************************
263 CsrWifiSmeApBeaconingStartCfmSend
266 This primitive confirms the completion of the request along with the
270 queue - Destination Task Queue
276 *******************************************************************************/
277 #define CsrWifiSmeApBeaconingStartCfmCreate(msg__, dst__, src__, interfaceTag__, status__, secIeLength__, secIe__) \
278 msg__ = kmalloc(sizeof(CsrWifiSmeApBeaconingStartCfm), GFP_KERNEL); \
279 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BEACONING_START_CFM, dst__, src__); \
280 msg__->interfaceTag = (interfaceTag__); \
281 msg__->status = (status__); \
282 msg__->secIeLength = (secIeLength__); \
283 msg__->secIe = (secIe__);
285 #define CsrWifiSmeApBeaconingStartCfmSendTo(dst__, src__, interfaceTag__, status__, secIeLength__, secIe__) \
287 CsrWifiSmeApBeaconingStartCfm *msg__; \
288 CsrWifiSmeApBeaconingStartCfmCreate(msg__, dst__, src__, interfaceTag__, status__, secIeLength__, secIe__); \
289 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
292 #define CsrWifiSmeApBeaconingStartCfmSend(dst__, interfaceTag__, status__, secIeLength__, secIe__) \
293 CsrWifiSmeApBeaconingStartCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, secIeLength__, secIe__)
295 /*******************************************************************************
298 CsrWifiSmeApBeaconingStopReqSend
301 This primitive requests the SME to STOP AP or P2PGO operation
304 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
307 *******************************************************************************/
308 #define CsrWifiSmeApBeaconingStopReqCreate(msg__, dst__, src__, interfaceTag__) \
309 msg__ = kmalloc(sizeof(CsrWifiSmeApBeaconingStopReq), GFP_KERNEL); \
310 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BEACONING_STOP_REQ, dst__, src__); \
311 msg__->interfaceTag = (interfaceTag__);
313 #define CsrWifiSmeApBeaconingStopReqSendTo(dst__, src__, interfaceTag__) \
315 CsrWifiSmeApBeaconingStopReq *msg__; \
316 CsrWifiSmeApBeaconingStopReqCreate(msg__, dst__, src__, interfaceTag__); \
317 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
320 #define CsrWifiSmeApBeaconingStopReqSend(src__, interfaceTag__) \
321 CsrWifiSmeApBeaconingStopReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__)
323 /*******************************************************************************
326 CsrWifiSmeApBeaconingStopCfmSend
329 This primitive confirms AP or P2PGO operation is terminated
332 queue - Destination Task Queue
336 *******************************************************************************/
337 #define CsrWifiSmeApBeaconingStopCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
338 msg__ = kmalloc(sizeof(CsrWifiSmeApBeaconingStopCfm), GFP_KERNEL); \
339 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BEACONING_STOP_CFM, dst__, src__); \
340 msg__->interfaceTag = (interfaceTag__); \
341 msg__->status = (status__);
343 #define CsrWifiSmeApBeaconingStopCfmSendTo(dst__, src__, interfaceTag__, status__) \
345 CsrWifiSmeApBeaconingStopCfm *msg__; \
346 CsrWifiSmeApBeaconingStopCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
347 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
350 #define CsrWifiSmeApBeaconingStopCfmSend(dst__, interfaceTag__, status__) \
351 CsrWifiSmeApBeaconingStopCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
353 /*******************************************************************************
356 CsrWifiSmeApErrorIndSend
359 This primitve is sent by SME to indicate some error in AP operationi
360 after AP operations were started successfully and continuing the AP
361 operation may lead to undesired behaviour. It is the responsibility of
362 the upper layers to stop AP operation if needed
365 queue - Destination Task Queue
366 interfaceTag - Range 0-1
368 status - Contains the error status
370 *******************************************************************************/
371 #define CsrWifiSmeApErrorIndCreate(msg__, dst__, src__, interfaceTag__, apType__, status__) \
372 msg__ = kmalloc(sizeof(CsrWifiSmeApErrorInd), GFP_KERNEL); \
373 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_ERROR_IND, dst__, src__); \
374 msg__->interfaceTag = (interfaceTag__); \
375 msg__->apType = (apType__); \
376 msg__->status = (status__);
378 #define CsrWifiSmeApErrorIndSendTo(dst__, src__, interfaceTag__, apType__, status__) \
380 CsrWifiSmeApErrorInd *msg__; \
381 CsrWifiSmeApErrorIndCreate(msg__, dst__, src__, interfaceTag__, apType__, status__); \
382 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
385 #define CsrWifiSmeApErrorIndSend(dst__, interfaceTag__, apType__, status__) \
386 CsrWifiSmeApErrorIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, apType__, status__)
388 /*******************************************************************************
391 CsrWifiSmeApStaConnectStartIndSend
394 This primitive indicates that a stations request to join the group/BSS is
398 queue - Destination Task Queue
402 *******************************************************************************/
403 #define CsrWifiSmeApStaConnectStartIndCreate(msg__, dst__, src__, interfaceTag__, peerMacAddress__) \
404 msg__ = kmalloc(sizeof(CsrWifiSmeApStaConnectStartInd), GFP_KERNEL); \
405 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_STA_CONNECT_START_IND, dst__, src__); \
406 msg__->interfaceTag = (interfaceTag__); \
407 msg__->peerMacAddress = (peerMacAddress__);
409 #define CsrWifiSmeApStaConnectStartIndSendTo(dst__, src__, interfaceTag__, peerMacAddress__) \
411 CsrWifiSmeApStaConnectStartInd *msg__; \
412 CsrWifiSmeApStaConnectStartIndCreate(msg__, dst__, src__, interfaceTag__, peerMacAddress__); \
413 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
416 #define CsrWifiSmeApStaConnectStartIndSend(dst__, interfaceTag__, peerMacAddress__) \
417 CsrWifiSmeApStaConnectStartIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, peerMacAddress__)
419 /*******************************************************************************
422 CsrWifiSmeApStaDisconnectReqSend
425 This primitive tells SME to deauth ot disassociate a particular station
429 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
434 keepBlocking - If TRUE, the station is blocked. If FALSE and the station
435 is connected, disconnect the station. If FALSE and the
436 station is not connected, no action is taken.
438 *******************************************************************************/
439 #define CsrWifiSmeApStaDisconnectReqCreate(msg__, dst__, src__, interfaceTag__, deauthReason__, disassocReason__, peerMacaddress__, keepBlocking__) \
440 msg__ = kmalloc(sizeof(CsrWifiSmeApStaDisconnectReq), GFP_KERNEL); \
441 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_STA_DISCONNECT_REQ, dst__, src__); \
442 msg__->interfaceTag = (interfaceTag__); \
443 msg__->deauthReason = (deauthReason__); \
444 msg__->disassocReason = (disassocReason__); \
445 msg__->peerMacaddress = (peerMacaddress__); \
446 msg__->keepBlocking = (keepBlocking__);
448 #define CsrWifiSmeApStaDisconnectReqSendTo(dst__, src__, interfaceTag__, deauthReason__, disassocReason__, peerMacaddress__, keepBlocking__) \
450 CsrWifiSmeApStaDisconnectReq *msg__; \
451 CsrWifiSmeApStaDisconnectReqCreate(msg__, dst__, src__, interfaceTag__, deauthReason__, disassocReason__, peerMacaddress__, keepBlocking__); \
452 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
455 #define CsrWifiSmeApStaDisconnectReqSend(src__, interfaceTag__, deauthReason__, disassocReason__, peerMacaddress__, keepBlocking__) \
456 CsrWifiSmeApStaDisconnectReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__, deauthReason__, disassocReason__, peerMacaddress__, keepBlocking__)
458 /*******************************************************************************
461 CsrWifiSmeApStaDisconnectCfmSend
464 This primitive confirms the station is disconnected
467 queue - Destination Task Queue
472 *******************************************************************************/
473 #define CsrWifiSmeApStaDisconnectCfmCreate(msg__, dst__, src__, interfaceTag__, status__, peerMacaddress__) \
474 msg__ = kmalloc(sizeof(CsrWifiSmeApStaDisconnectCfm), GFP_KERNEL); \
475 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_STA_DISCONNECT_CFM, dst__, src__); \
476 msg__->interfaceTag = (interfaceTag__); \
477 msg__->status = (status__); \
478 msg__->peerMacaddress = (peerMacaddress__);
480 #define CsrWifiSmeApStaDisconnectCfmSendTo(dst__, src__, interfaceTag__, status__, peerMacaddress__) \
482 CsrWifiSmeApStaDisconnectCfm *msg__; \
483 CsrWifiSmeApStaDisconnectCfmCreate(msg__, dst__, src__, interfaceTag__, status__, peerMacaddress__); \
484 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
487 #define CsrWifiSmeApStaDisconnectCfmSend(dst__, interfaceTag__, status__, peerMacaddress__) \
488 CsrWifiSmeApStaDisconnectCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, peerMacaddress__)
490 /*******************************************************************************
493 CsrWifiSmeApStaNotifyIndSend
496 This primitive indicates that a station has joined or a previously joined
497 station has left the BSS/group
500 queue - Destination Task Queue
513 *******************************************************************************/
514 #define CsrWifiSmeApStaNotifyIndCreate(msg__, dst__, src__, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__, disassocReason__, deauthReason__, WpsRegistration__, secIeLength__, secIe__, groupKeyId__, seqNumber__) \
515 msg__ = kmalloc(sizeof(CsrWifiSmeApStaNotifyInd), GFP_KERNEL); \
516 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_STA_NOTIFY_IND, dst__, src__); \
517 msg__->interfaceTag = (interfaceTag__); \
518 msg__->mediaStatus = (mediaStatus__); \
519 msg__->peerMacAddress = (peerMacAddress__); \
520 msg__->peerDeviceAddress = (peerDeviceAddress__); \
521 msg__->disassocReason = (disassocReason__); \
522 msg__->deauthReason = (deauthReason__); \
523 msg__->WpsRegistration = (WpsRegistration__); \
524 msg__->secIeLength = (secIeLength__); \
525 msg__->secIe = (secIe__); \
526 msg__->groupKeyId = (groupKeyId__); \
527 memcpy(msg__->seqNumber, (seqNumber__), sizeof(u16) * 8);
529 #define CsrWifiSmeApStaNotifyIndSendTo(dst__, src__, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__, disassocReason__, deauthReason__, WpsRegistration__, secIeLength__, secIe__, groupKeyId__, seqNumber__) \
531 CsrWifiSmeApStaNotifyInd *msg__; \
532 CsrWifiSmeApStaNotifyIndCreate(msg__, dst__, src__, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__, disassocReason__, deauthReason__, WpsRegistration__, secIeLength__, secIe__, groupKeyId__, seqNumber__); \
533 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
536 #define CsrWifiSmeApStaNotifyIndSend(dst__, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__, disassocReason__, deauthReason__, WpsRegistration__, secIeLength__, secIe__, groupKeyId__, seqNumber__) \
537 CsrWifiSmeApStaNotifyIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__, disassocReason__, deauthReason__, WpsRegistration__, secIeLength__, secIe__, groupKeyId__, seqNumber__)
539 /*******************************************************************************
542 CsrWifiSmeApWmmParamUpdateReqSend
545 Application uses this primitive to update the WMM parameters on the fly
548 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
550 wmmApParams - WMM parameters to be used for local firmware queue
552 wmmApBcParams - WMM parameters to be advertised in beacon/probe response
554 *******************************************************************************/
555 #define CsrWifiSmeApWmmParamUpdateReqCreate(msg__, dst__, src__, interfaceTag__, wmmApParams__, wmmApBcParams__) \
556 msg__ = kmalloc(sizeof(CsrWifiSmeApWmmParamUpdateReq), GFP_KERNEL); \
557 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WMM_PARAM_UPDATE_REQ, dst__, src__); \
558 msg__->interfaceTag = (interfaceTag__); \
559 memcpy(msg__->wmmApParams, (wmmApParams__), sizeof(CsrWifiSmeWmmAcParams) * 4); \
560 memcpy(msg__->wmmApBcParams, (wmmApBcParams__), sizeof(CsrWifiSmeWmmAcParams) * 4);
562 #define CsrWifiSmeApWmmParamUpdateReqSendTo(dst__, src__, interfaceTag__, wmmApParams__, wmmApBcParams__) \
564 CsrWifiSmeApWmmParamUpdateReq *msg__; \
565 CsrWifiSmeApWmmParamUpdateReqCreate(msg__, dst__, src__, interfaceTag__, wmmApParams__, wmmApBcParams__); \
566 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
569 #define CsrWifiSmeApWmmParamUpdateReqSend(src__, interfaceTag__, wmmApParams__, wmmApBcParams__) \
570 CsrWifiSmeApWmmParamUpdateReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__, wmmApParams__, wmmApBcParams__)
572 /*******************************************************************************
575 CsrWifiSmeApWmmParamUpdateCfmSend
578 A confirm for CSR_WIFI_SME_AP_WMM_PARAM_UPDATE.request
581 queue - Destination Task Queue
585 *******************************************************************************/
586 #define CsrWifiSmeApWmmParamUpdateCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
587 msg__ = kmalloc(sizeof(CsrWifiSmeApWmmParamUpdateCfm), GFP_KERNEL); \
588 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WMM_PARAM_UPDATE_CFM, dst__, src__); \
589 msg__->interfaceTag = (interfaceTag__); \
590 msg__->status = (status__);
592 #define CsrWifiSmeApWmmParamUpdateCfmSendTo(dst__, src__, interfaceTag__, status__) \
594 CsrWifiSmeApWmmParamUpdateCfm *msg__; \
595 CsrWifiSmeApWmmParamUpdateCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
596 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
599 #define CsrWifiSmeApWmmParamUpdateCfmSend(dst__, interfaceTag__, status__) \
600 CsrWifiSmeApWmmParamUpdateCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
602 /*******************************************************************************
605 CsrWifiSmeApWpsConfigurationReqSend
608 This primitive passes the WPS information for the device to SME. This may
609 be accepted only if no interface is active.
612 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
613 wpsConfig - WPS config.
615 *******************************************************************************/
616 #define CsrWifiSmeApWpsConfigurationReqCreate(msg__, dst__, src__, wpsConfig__) \
617 msg__ = kmalloc(sizeof(CsrWifiSmeApWpsConfigurationReq), GFP_KERNEL); \
618 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_CONFIGURATION_REQ, dst__, src__); \
619 msg__->wpsConfig = (wpsConfig__);
621 #define CsrWifiSmeApWpsConfigurationReqSendTo(dst__, src__, wpsConfig__) \
623 CsrWifiSmeApWpsConfigurationReq *msg__; \
624 CsrWifiSmeApWpsConfigurationReqCreate(msg__, dst__, src__, wpsConfig__); \
625 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
628 #define CsrWifiSmeApWpsConfigurationReqSend(src__, wpsConfig__) \
629 CsrWifiSmeApWpsConfigurationReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, wpsConfig__)
631 /*******************************************************************************
634 CsrWifiSmeApWpsConfigurationCfmSend
640 queue - Destination Task Queue
641 status - Status of the request.
643 *******************************************************************************/
644 #define CsrWifiSmeApWpsConfigurationCfmCreate(msg__, dst__, src__, status__) \
645 msg__ = kmalloc(sizeof(CsrWifiSmeApWpsConfigurationCfm), GFP_KERNEL); \
646 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_CONFIGURATION_CFM, dst__, src__); \
647 msg__->status = (status__);
649 #define CsrWifiSmeApWpsConfigurationCfmSendTo(dst__, src__, status__) \
651 CsrWifiSmeApWpsConfigurationCfm *msg__; \
652 CsrWifiSmeApWpsConfigurationCfmCreate(msg__, dst__, src__, status__); \
653 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
656 #define CsrWifiSmeApWpsConfigurationCfmSend(dst__, status__) \
657 CsrWifiSmeApWpsConfigurationCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
659 /*******************************************************************************
662 CsrWifiSmeApWpsRegistrationFinishedReqSend
665 This primitive tells SME that WPS registration procedure has finished
668 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
671 *******************************************************************************/
672 #define CsrWifiSmeApWpsRegistrationFinishedReqCreate(msg__, dst__, src__, interfaceTag__) \
673 msg__ = kmalloc(sizeof(CsrWifiSmeApWpsRegistrationFinishedReq), GFP_KERNEL); \
674 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_REGISTRATION_FINISHED_REQ, dst__, src__); \
675 msg__->interfaceTag = (interfaceTag__);
677 #define CsrWifiSmeApWpsRegistrationFinishedReqSendTo(dst__, src__, interfaceTag__) \
679 CsrWifiSmeApWpsRegistrationFinishedReq *msg__; \
680 CsrWifiSmeApWpsRegistrationFinishedReqCreate(msg__, dst__, src__, interfaceTag__); \
681 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
684 #define CsrWifiSmeApWpsRegistrationFinishedReqSend(src__, interfaceTag__) \
685 CsrWifiSmeApWpsRegistrationFinishedReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__)
687 /*******************************************************************************
690 CsrWifiSmeApWpsRegistrationFinishedCfmSend
693 A confirm for UNIFI_MGT_AP_WPS_REGISTRATION_FINISHED.request
696 queue - Destination Task Queue
700 *******************************************************************************/
701 #define CsrWifiSmeApWpsRegistrationFinishedCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
702 msg__ = kmalloc(sizeof(CsrWifiSmeApWpsRegistrationFinishedCfm), GFP_KERNEL); \
703 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_REGISTRATION_FINISHED_CFM, dst__, src__); \
704 msg__->interfaceTag = (interfaceTag__); \
705 msg__->status = (status__);
707 #define CsrWifiSmeApWpsRegistrationFinishedCfmSendTo(dst__, src__, interfaceTag__, status__) \
709 CsrWifiSmeApWpsRegistrationFinishedCfm *msg__; \
710 CsrWifiSmeApWpsRegistrationFinishedCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
711 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
714 #define CsrWifiSmeApWpsRegistrationFinishedCfmSend(dst__, interfaceTag__, status__) \
715 CsrWifiSmeApWpsRegistrationFinishedCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
717 /*******************************************************************************
720 CsrWifiSmeApWpsRegistrationStartedReqSend
723 This primitive tells SME that WPS registration procedure has started
726 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
728 SelectedDevicePasswordId -
729 SelectedconfigMethod -
731 *******************************************************************************/
732 #define CsrWifiSmeApWpsRegistrationStartedReqCreate(msg__, dst__, src__, interfaceTag__, SelectedDevicePasswordId__, SelectedconfigMethod__) \
733 msg__ = kmalloc(sizeof(CsrWifiSmeApWpsRegistrationStartedReq), GFP_KERNEL); \
734 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_REGISTRATION_STARTED_REQ, dst__, src__); \
735 msg__->interfaceTag = (interfaceTag__); \
736 msg__->SelectedDevicePasswordId = (SelectedDevicePasswordId__); \
737 msg__->SelectedconfigMethod = (SelectedconfigMethod__);
739 #define CsrWifiSmeApWpsRegistrationStartedReqSendTo(dst__, src__, interfaceTag__, SelectedDevicePasswordId__, SelectedconfigMethod__) \
741 CsrWifiSmeApWpsRegistrationStartedReq *msg__; \
742 CsrWifiSmeApWpsRegistrationStartedReqCreate(msg__, dst__, src__, interfaceTag__, SelectedDevicePasswordId__, SelectedconfigMethod__); \
743 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
746 #define CsrWifiSmeApWpsRegistrationStartedReqSend(src__, interfaceTag__, SelectedDevicePasswordId__, SelectedconfigMethod__) \
747 CsrWifiSmeApWpsRegistrationStartedReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__, SelectedDevicePasswordId__, SelectedconfigMethod__)
749 /*******************************************************************************
752 CsrWifiSmeApWpsRegistrationStartedCfmSend
755 A confirm for UNIFI_MGT_AP_WPS_REGISTRATION_STARTED.request
758 queue - Destination Task Queue
762 *******************************************************************************/
763 #define CsrWifiSmeApWpsRegistrationStartedCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
764 msg__ = kmalloc(sizeof(CsrWifiSmeApWpsRegistrationStartedCfm), GFP_KERNEL); \
765 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_REGISTRATION_STARTED_CFM, dst__, src__); \
766 msg__->interfaceTag = (interfaceTag__); \
767 msg__->status = (status__);
769 #define CsrWifiSmeApWpsRegistrationStartedCfmSendTo(dst__, src__, interfaceTag__, status__) \
771 CsrWifiSmeApWpsRegistrationStartedCfm *msg__; \
772 CsrWifiSmeApWpsRegistrationStartedCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
773 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
776 #define CsrWifiSmeApWpsRegistrationStartedCfmSend(dst__, interfaceTag__, status__) \
777 CsrWifiSmeApWpsRegistrationStartedCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
784 #endif /* CSR_WIFI_SME_AP_LIB_H__ */