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"
30 #ifndef CSR_WIFI_AP_ENABLE
31 #error CSR_WIFI_AP_ENABLE MUST be defined inorder to use csr_wifi_sme_ap_lib.h
34 /*----------------------------------------------------------------------------*
35 * CsrWifiSmeApFreeUpstreamMessageContents
38 * Free the allocated memory in a CSR_WIFI_SME_AP upstream message. Does not
39 * free the message itself, and can only be used for upstream messages.
42 * Deallocates the resources in a CSR_WIFI_SME_AP upstream message
43 *----------------------------------------------------------------------------*/
44 void CsrWifiSmeApFreeUpstreamMessageContents(u16 eventClass, void *message);
46 /*----------------------------------------------------------------------------*
47 * CsrWifiSmeApFreeDownstreamMessageContents
50 * Free the allocated memory in a CSR_WIFI_SME_AP downstream message. Does not
51 * free the message itself, and can only be used for downstream messages.
54 * Deallocates the resources in a CSR_WIFI_SME_AP downstream message
55 *----------------------------------------------------------------------------*/
56 void CsrWifiSmeApFreeDownstreamMessageContents(u16 eventClass, void *message);
58 /*----------------------------------------------------------------------------*
59 * Enum to string functions
60 *----------------------------------------------------------------------------*/
61 const char* CsrWifiSmeApAccessTypeToString(CsrWifiSmeApAccessType value);
62 const char* CsrWifiSmeApAuthSupportToString(CsrWifiSmeApAuthSupport value);
63 const char* CsrWifiSmeApAuthTypeToString(CsrWifiSmeApAuthType value);
64 const char* CsrWifiSmeApDirectionToString(CsrWifiSmeApDirection value);
65 const char* CsrWifiSmeApPhySupportToString(CsrWifiSmeApPhySupport value);
66 const char* CsrWifiSmeApTypeToString(CsrWifiSmeApType value);
69 /*----------------------------------------------------------------------------*
70 * CsrPrim Type toString function.
71 * Converts a message type to the String name of the Message
72 *----------------------------------------------------------------------------*/
73 const char* CsrWifiSmeApPrimTypeToString(CsrPrim msgType);
75 /*----------------------------------------------------------------------------*
76 * Lookup arrays for PrimType name Strings
77 *----------------------------------------------------------------------------*/
78 extern const char *CsrWifiSmeApUpstreamPrimNames[CSR_WIFI_SME_AP_PRIM_UPSTREAM_COUNT];
79 extern const char *CsrWifiSmeApDownstreamPrimNames[CSR_WIFI_SME_AP_PRIM_DOWNSTREAM_COUNT];
81 /*******************************************************************************
84 CsrWifiSmeApActiveBaGetReqSend
87 This primitive used to retrieve information related to the active block
91 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
94 *******************************************************************************/
95 #define CsrWifiSmeApActiveBaGetReqCreate(msg__, dst__, src__, interfaceTag__) \
96 msg__ = kmalloc(sizeof(CsrWifiSmeApActiveBaGetReq), GFP_KERNEL); \
97 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_ACTIVE_BA_GET_REQ, dst__, src__); \
98 msg__->interfaceTag = (interfaceTag__);
100 #define CsrWifiSmeApActiveBaGetReqSendTo(dst__, src__, interfaceTag__) \
102 CsrWifiSmeApActiveBaGetReq *msg__; \
103 CsrWifiSmeApActiveBaGetReqCreate(msg__, dst__, src__, interfaceTag__); \
104 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
107 #define CsrWifiSmeApActiveBaGetReqSend(src__, interfaceTag__) \
108 CsrWifiSmeApActiveBaGetReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__)
110 /*******************************************************************************
113 CsrWifiSmeApActiveBaGetCfmSend
116 This primitive carries the information related to the active ba sessions
119 queue - Destination Task Queue
121 status - Reports the result of the request
122 activeBaCount - Number of active block ack session
123 activeBaSessions - Points to a buffer containing an array of
124 CsrWifiSmeApBaSession structures.
126 *******************************************************************************/
127 #define CsrWifiSmeApActiveBaGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, activeBaCount__, activeBaSessions__) \
128 msg__ = kmalloc(sizeof(CsrWifiSmeApActiveBaGetCfm), GFP_KERNEL); \
129 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_ACTIVE_BA_GET_CFM, dst__, src__); \
130 msg__->interfaceTag = (interfaceTag__); \
131 msg__->status = (status__); \
132 msg__->activeBaCount = (activeBaCount__); \
133 msg__->activeBaSessions = (activeBaSessions__);
135 #define CsrWifiSmeApActiveBaGetCfmSendTo(dst__, src__, interfaceTag__, status__, activeBaCount__, activeBaSessions__) \
137 CsrWifiSmeApActiveBaGetCfm *msg__; \
138 CsrWifiSmeApActiveBaGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, activeBaCount__, activeBaSessions__); \
139 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
142 #define CsrWifiSmeApActiveBaGetCfmSend(dst__, interfaceTag__, status__, activeBaCount__, activeBaSessions__) \
143 CsrWifiSmeApActiveBaGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, activeBaCount__, activeBaSessions__)
145 /*******************************************************************************
148 CsrWifiSmeApBaDeleteReqSend
151 This primitive is used to delete an active block ack session
154 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
157 baSession - BA session to be deleted
159 *******************************************************************************/
160 #define CsrWifiSmeApBaDeleteReqCreate(msg__, dst__, src__, interfaceTag__, reason__, baSession__) \
161 msg__ = kmalloc(sizeof(CsrWifiSmeApBaDeleteReq), GFP_KERNEL); \
162 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BA_DELETE_REQ, dst__, src__); \
163 msg__->interfaceTag = (interfaceTag__); \
164 msg__->reason = (reason__); \
165 msg__->baSession = (baSession__);
167 #define CsrWifiSmeApBaDeleteReqSendTo(dst__, src__, interfaceTag__, reason__, baSession__) \
169 CsrWifiSmeApBaDeleteReq *msg__; \
170 CsrWifiSmeApBaDeleteReqCreate(msg__, dst__, src__, interfaceTag__, reason__, baSession__); \
171 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
174 #define CsrWifiSmeApBaDeleteReqSend(src__, interfaceTag__, reason__, baSession__) \
175 CsrWifiSmeApBaDeleteReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__, reason__, baSession__)
177 /*******************************************************************************
180 CsrWifiSmeApBaDeleteCfmSend
183 This primitive confirms the BA is deleted
186 queue - Destination Task Queue
188 status - Reports the result of the request
189 baSession - deleted BA session
191 *******************************************************************************/
192 #define CsrWifiSmeApBaDeleteCfmCreate(msg__, dst__, src__, interfaceTag__, status__, baSession__) \
193 msg__ = kmalloc(sizeof(CsrWifiSmeApBaDeleteCfm), GFP_KERNEL); \
194 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BA_DELETE_CFM, dst__, src__); \
195 msg__->interfaceTag = (interfaceTag__); \
196 msg__->status = (status__); \
197 msg__->baSession = (baSession__);
199 #define CsrWifiSmeApBaDeleteCfmSendTo(dst__, src__, interfaceTag__, status__, baSession__) \
201 CsrWifiSmeApBaDeleteCfm *msg__; \
202 CsrWifiSmeApBaDeleteCfmCreate(msg__, dst__, src__, interfaceTag__, status__, baSession__); \
203 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
206 #define CsrWifiSmeApBaDeleteCfmSend(dst__, interfaceTag__, status__, baSession__) \
207 CsrWifiSmeApBaDeleteCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, baSession__)
209 /*******************************************************************************
212 CsrWifiSmeApBeaconingStartReqSend
215 This primitive requests the SME to start AP or GO functionality
218 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
220 initialPresence - Set to 0, if Not in a group fomration phase, set to 1 ,
221 during group formation phase
222 apType - apType : Legacy AP or P2PGO
223 cloakSsid - cloakSsid flag.
225 ifIndex - Radio Interface
227 maxConnections - Maximum Stations + P2PClients allowed
228 apCredentials - AP security credeitals used to advertise in beacon /probe
230 smeApConfig - AP configuration
231 p2pGoParam - P2P specific GO parameters. Ignored if it is a leagacy AP
233 *******************************************************************************/
234 #define CsrWifiSmeApBeaconingStartReqCreate(msg__, dst__, src__, interfaceTag__, initialPresence__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, maxConnections__, apCredentials__, smeApConfig__, p2pGoParam__) \
235 msg__ = kmalloc(sizeof(CsrWifiSmeApBeaconingStartReq), GFP_KERNEL); \
236 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BEACONING_START_REQ, dst__, src__); \
237 msg__->interfaceTag = (interfaceTag__); \
238 msg__->initialPresence = (initialPresence__); \
239 msg__->apType = (apType__); \
240 msg__->cloakSsid = (cloakSsid__); \
241 msg__->ssid = (ssid__); \
242 msg__->ifIndex = (ifIndex__); \
243 msg__->channel = (channel__); \
244 msg__->maxConnections = (maxConnections__); \
245 msg__->apCredentials = (apCredentials__); \
246 msg__->smeApConfig = (smeApConfig__); \
247 msg__->p2pGoParam = (p2pGoParam__);
249 #define CsrWifiSmeApBeaconingStartReqSendTo(dst__, src__, interfaceTag__, initialPresence__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, maxConnections__, apCredentials__, smeApConfig__, p2pGoParam__) \
251 CsrWifiSmeApBeaconingStartReq *msg__; \
252 CsrWifiSmeApBeaconingStartReqCreate(msg__, dst__, src__, interfaceTag__, initialPresence__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, maxConnections__, apCredentials__, smeApConfig__, p2pGoParam__); \
253 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
256 #define CsrWifiSmeApBeaconingStartReqSend(src__, interfaceTag__, initialPresence__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, maxConnections__, apCredentials__, smeApConfig__, p2pGoParam__) \
257 CsrWifiSmeApBeaconingStartReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__, initialPresence__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, maxConnections__, apCredentials__, smeApConfig__, p2pGoParam__)
259 /*******************************************************************************
262 CsrWifiSmeApBeaconingStartCfmSend
265 This primitive confirms the completion of the request along with the
269 queue - Destination Task Queue
275 *******************************************************************************/
276 #define CsrWifiSmeApBeaconingStartCfmCreate(msg__, dst__, src__, interfaceTag__, status__, secIeLength__, secIe__) \
277 msg__ = kmalloc(sizeof(CsrWifiSmeApBeaconingStartCfm), GFP_KERNEL); \
278 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BEACONING_START_CFM, dst__, src__); \
279 msg__->interfaceTag = (interfaceTag__); \
280 msg__->status = (status__); \
281 msg__->secIeLength = (secIeLength__); \
282 msg__->secIe = (secIe__);
284 #define CsrWifiSmeApBeaconingStartCfmSendTo(dst__, src__, interfaceTag__, status__, secIeLength__, secIe__) \
286 CsrWifiSmeApBeaconingStartCfm *msg__; \
287 CsrWifiSmeApBeaconingStartCfmCreate(msg__, dst__, src__, interfaceTag__, status__, secIeLength__, secIe__); \
288 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
291 #define CsrWifiSmeApBeaconingStartCfmSend(dst__, interfaceTag__, status__, secIeLength__, secIe__) \
292 CsrWifiSmeApBeaconingStartCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, secIeLength__, secIe__)
294 /*******************************************************************************
297 CsrWifiSmeApBeaconingStopReqSend
300 This primitive requests the SME to STOP AP or P2PGO operation
303 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
306 *******************************************************************************/
307 #define CsrWifiSmeApBeaconingStopReqCreate(msg__, dst__, src__, interfaceTag__) \
308 msg__ = kmalloc(sizeof(CsrWifiSmeApBeaconingStopReq), GFP_KERNEL); \
309 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BEACONING_STOP_REQ, dst__, src__); \
310 msg__->interfaceTag = (interfaceTag__);
312 #define CsrWifiSmeApBeaconingStopReqSendTo(dst__, src__, interfaceTag__) \
314 CsrWifiSmeApBeaconingStopReq *msg__; \
315 CsrWifiSmeApBeaconingStopReqCreate(msg__, dst__, src__, interfaceTag__); \
316 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
319 #define CsrWifiSmeApBeaconingStopReqSend(src__, interfaceTag__) \
320 CsrWifiSmeApBeaconingStopReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__)
322 /*******************************************************************************
325 CsrWifiSmeApBeaconingStopCfmSend
328 This primitive confirms AP or P2PGO operation is terminated
331 queue - Destination Task Queue
335 *******************************************************************************/
336 #define CsrWifiSmeApBeaconingStopCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
337 msg__ = kmalloc(sizeof(CsrWifiSmeApBeaconingStopCfm), GFP_KERNEL); \
338 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BEACONING_STOP_CFM, dst__, src__); \
339 msg__->interfaceTag = (interfaceTag__); \
340 msg__->status = (status__);
342 #define CsrWifiSmeApBeaconingStopCfmSendTo(dst__, src__, interfaceTag__, status__) \
344 CsrWifiSmeApBeaconingStopCfm *msg__; \
345 CsrWifiSmeApBeaconingStopCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
346 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
349 #define CsrWifiSmeApBeaconingStopCfmSend(dst__, interfaceTag__, status__) \
350 CsrWifiSmeApBeaconingStopCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
352 /*******************************************************************************
355 CsrWifiSmeApErrorIndSend
358 This primitve is sent by SME to indicate some error in AP operationi
359 after AP operations were started successfully and continuing the AP
360 operation may lead to undesired behaviour. It is the responsibility of
361 the upper layers to stop AP operation if needed
364 queue - Destination Task Queue
365 interfaceTag - Range 0-1
367 status - Contains the error status
369 *******************************************************************************/
370 #define CsrWifiSmeApErrorIndCreate(msg__, dst__, src__, interfaceTag__, apType__, status__) \
371 msg__ = kmalloc(sizeof(CsrWifiSmeApErrorInd), GFP_KERNEL); \
372 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_ERROR_IND, dst__, src__); \
373 msg__->interfaceTag = (interfaceTag__); \
374 msg__->apType = (apType__); \
375 msg__->status = (status__);
377 #define CsrWifiSmeApErrorIndSendTo(dst__, src__, interfaceTag__, apType__, status__) \
379 CsrWifiSmeApErrorInd *msg__; \
380 CsrWifiSmeApErrorIndCreate(msg__, dst__, src__, interfaceTag__, apType__, status__); \
381 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
384 #define CsrWifiSmeApErrorIndSend(dst__, interfaceTag__, apType__, status__) \
385 CsrWifiSmeApErrorIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, apType__, status__)
387 /*******************************************************************************
390 CsrWifiSmeApStaConnectStartIndSend
393 This primitive indicates that a stations request to join the group/BSS is
397 queue - Destination Task Queue
401 *******************************************************************************/
402 #define CsrWifiSmeApStaConnectStartIndCreate(msg__, dst__, src__, interfaceTag__, peerMacAddress__) \
403 msg__ = kmalloc(sizeof(CsrWifiSmeApStaConnectStartInd), GFP_KERNEL); \
404 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_STA_CONNECT_START_IND, dst__, src__); \
405 msg__->interfaceTag = (interfaceTag__); \
406 msg__->peerMacAddress = (peerMacAddress__);
408 #define CsrWifiSmeApStaConnectStartIndSendTo(dst__, src__, interfaceTag__, peerMacAddress__) \
410 CsrWifiSmeApStaConnectStartInd *msg__; \
411 CsrWifiSmeApStaConnectStartIndCreate(msg__, dst__, src__, interfaceTag__, peerMacAddress__); \
412 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
415 #define CsrWifiSmeApStaConnectStartIndSend(dst__, interfaceTag__, peerMacAddress__) \
416 CsrWifiSmeApStaConnectStartIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, peerMacAddress__)
418 /*******************************************************************************
421 CsrWifiSmeApStaDisconnectReqSend
424 This primitive tells SME to deauth ot disassociate a particular station
428 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
433 keepBlocking - If TRUE, the station is blocked. If FALSE and the station
434 is connected, disconnect the station. If FALSE and the
435 station is not connected, no action is taken.
437 *******************************************************************************/
438 #define CsrWifiSmeApStaDisconnectReqCreate(msg__, dst__, src__, interfaceTag__, deauthReason__, disassocReason__, peerMacaddress__, keepBlocking__) \
439 msg__ = kmalloc(sizeof(CsrWifiSmeApStaDisconnectReq), GFP_KERNEL); \
440 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_STA_DISCONNECT_REQ, dst__, src__); \
441 msg__->interfaceTag = (interfaceTag__); \
442 msg__->deauthReason = (deauthReason__); \
443 msg__->disassocReason = (disassocReason__); \
444 msg__->peerMacaddress = (peerMacaddress__); \
445 msg__->keepBlocking = (keepBlocking__);
447 #define CsrWifiSmeApStaDisconnectReqSendTo(dst__, src__, interfaceTag__, deauthReason__, disassocReason__, peerMacaddress__, keepBlocking__) \
449 CsrWifiSmeApStaDisconnectReq *msg__; \
450 CsrWifiSmeApStaDisconnectReqCreate(msg__, dst__, src__, interfaceTag__, deauthReason__, disassocReason__, peerMacaddress__, keepBlocking__); \
451 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
454 #define CsrWifiSmeApStaDisconnectReqSend(src__, interfaceTag__, deauthReason__, disassocReason__, peerMacaddress__, keepBlocking__) \
455 CsrWifiSmeApStaDisconnectReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__, deauthReason__, disassocReason__, peerMacaddress__, keepBlocking__)
457 /*******************************************************************************
460 CsrWifiSmeApStaDisconnectCfmSend
463 This primitive confirms the station is disconnected
466 queue - Destination Task Queue
471 *******************************************************************************/
472 #define CsrWifiSmeApStaDisconnectCfmCreate(msg__, dst__, src__, interfaceTag__, status__, peerMacaddress__) \
473 msg__ = kmalloc(sizeof(CsrWifiSmeApStaDisconnectCfm), GFP_KERNEL); \
474 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_STA_DISCONNECT_CFM, dst__, src__); \
475 msg__->interfaceTag = (interfaceTag__); \
476 msg__->status = (status__); \
477 msg__->peerMacaddress = (peerMacaddress__);
479 #define CsrWifiSmeApStaDisconnectCfmSendTo(dst__, src__, interfaceTag__, status__, peerMacaddress__) \
481 CsrWifiSmeApStaDisconnectCfm *msg__; \
482 CsrWifiSmeApStaDisconnectCfmCreate(msg__, dst__, src__, interfaceTag__, status__, peerMacaddress__); \
483 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
486 #define CsrWifiSmeApStaDisconnectCfmSend(dst__, interfaceTag__, status__, peerMacaddress__) \
487 CsrWifiSmeApStaDisconnectCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, peerMacaddress__)
489 /*******************************************************************************
492 CsrWifiSmeApStaNotifyIndSend
495 This primitive indicates that a station has joined or a previously joined
496 station has left the BSS/group
499 queue - Destination Task Queue
512 *******************************************************************************/
513 #define CsrWifiSmeApStaNotifyIndCreate(msg__, dst__, src__, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__, disassocReason__, deauthReason__, WpsRegistration__, secIeLength__, secIe__, groupKeyId__, seqNumber__) \
514 msg__ = kmalloc(sizeof(CsrWifiSmeApStaNotifyInd), GFP_KERNEL); \
515 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_STA_NOTIFY_IND, dst__, src__); \
516 msg__->interfaceTag = (interfaceTag__); \
517 msg__->mediaStatus = (mediaStatus__); \
518 msg__->peerMacAddress = (peerMacAddress__); \
519 msg__->peerDeviceAddress = (peerDeviceAddress__); \
520 msg__->disassocReason = (disassocReason__); \
521 msg__->deauthReason = (deauthReason__); \
522 msg__->WpsRegistration = (WpsRegistration__); \
523 msg__->secIeLength = (secIeLength__); \
524 msg__->secIe = (secIe__); \
525 msg__->groupKeyId = (groupKeyId__); \
526 memcpy(msg__->seqNumber, (seqNumber__), sizeof(u16) * 8);
528 #define CsrWifiSmeApStaNotifyIndSendTo(dst__, src__, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__, disassocReason__, deauthReason__, WpsRegistration__, secIeLength__, secIe__, groupKeyId__, seqNumber__) \
530 CsrWifiSmeApStaNotifyInd *msg__; \
531 CsrWifiSmeApStaNotifyIndCreate(msg__, dst__, src__, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__, disassocReason__, deauthReason__, WpsRegistration__, secIeLength__, secIe__, groupKeyId__, seqNumber__); \
532 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
535 #define CsrWifiSmeApStaNotifyIndSend(dst__, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__, disassocReason__, deauthReason__, WpsRegistration__, secIeLength__, secIe__, groupKeyId__, seqNumber__) \
536 CsrWifiSmeApStaNotifyIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__, disassocReason__, deauthReason__, WpsRegistration__, secIeLength__, secIe__, groupKeyId__, seqNumber__)
538 /*******************************************************************************
541 CsrWifiSmeApWmmParamUpdateReqSend
544 Application uses this primitive to update the WMM parameters on the fly
547 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
549 wmmApParams - WMM parameters to be used for local firmware queue
551 wmmApBcParams - WMM parameters to be advertised in beacon/probe response
553 *******************************************************************************/
554 #define CsrWifiSmeApWmmParamUpdateReqCreate(msg__, dst__, src__, interfaceTag__, wmmApParams__, wmmApBcParams__) \
555 msg__ = kmalloc(sizeof(CsrWifiSmeApWmmParamUpdateReq), GFP_KERNEL); \
556 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WMM_PARAM_UPDATE_REQ, dst__, src__); \
557 msg__->interfaceTag = (interfaceTag__); \
558 memcpy(msg__->wmmApParams, (wmmApParams__), sizeof(CsrWifiSmeWmmAcParams) * 4); \
559 memcpy(msg__->wmmApBcParams, (wmmApBcParams__), sizeof(CsrWifiSmeWmmAcParams) * 4);
561 #define CsrWifiSmeApWmmParamUpdateReqSendTo(dst__, src__, interfaceTag__, wmmApParams__, wmmApBcParams__) \
563 CsrWifiSmeApWmmParamUpdateReq *msg__; \
564 CsrWifiSmeApWmmParamUpdateReqCreate(msg__, dst__, src__, interfaceTag__, wmmApParams__, wmmApBcParams__); \
565 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
568 #define CsrWifiSmeApWmmParamUpdateReqSend(src__, interfaceTag__, wmmApParams__, wmmApBcParams__) \
569 CsrWifiSmeApWmmParamUpdateReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__, wmmApParams__, wmmApBcParams__)
571 /*******************************************************************************
574 CsrWifiSmeApWmmParamUpdateCfmSend
577 A confirm for CSR_WIFI_SME_AP_WMM_PARAM_UPDATE.request
580 queue - Destination Task Queue
584 *******************************************************************************/
585 #define CsrWifiSmeApWmmParamUpdateCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
586 msg__ = kmalloc(sizeof(CsrWifiSmeApWmmParamUpdateCfm), GFP_KERNEL); \
587 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WMM_PARAM_UPDATE_CFM, dst__, src__); \
588 msg__->interfaceTag = (interfaceTag__); \
589 msg__->status = (status__);
591 #define CsrWifiSmeApWmmParamUpdateCfmSendTo(dst__, src__, interfaceTag__, status__) \
593 CsrWifiSmeApWmmParamUpdateCfm *msg__; \
594 CsrWifiSmeApWmmParamUpdateCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
595 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
598 #define CsrWifiSmeApWmmParamUpdateCfmSend(dst__, interfaceTag__, status__) \
599 CsrWifiSmeApWmmParamUpdateCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
601 /*******************************************************************************
604 CsrWifiSmeApWpsConfigurationReqSend
607 This primitive passes the WPS information for the device to SME. This may
608 be accepted only if no interface is active.
611 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
612 wpsConfig - WPS config.
614 *******************************************************************************/
615 #define CsrWifiSmeApWpsConfigurationReqCreate(msg__, dst__, src__, wpsConfig__) \
616 msg__ = kmalloc(sizeof(CsrWifiSmeApWpsConfigurationReq), GFP_KERNEL); \
617 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_CONFIGURATION_REQ, dst__, src__); \
618 msg__->wpsConfig = (wpsConfig__);
620 #define CsrWifiSmeApWpsConfigurationReqSendTo(dst__, src__, wpsConfig__) \
622 CsrWifiSmeApWpsConfigurationReq *msg__; \
623 CsrWifiSmeApWpsConfigurationReqCreate(msg__, dst__, src__, wpsConfig__); \
624 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
627 #define CsrWifiSmeApWpsConfigurationReqSend(src__, wpsConfig__) \
628 CsrWifiSmeApWpsConfigurationReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, wpsConfig__)
630 /*******************************************************************************
633 CsrWifiSmeApWpsConfigurationCfmSend
639 queue - Destination Task Queue
640 status - Status of the request.
642 *******************************************************************************/
643 #define CsrWifiSmeApWpsConfigurationCfmCreate(msg__, dst__, src__, status__) \
644 msg__ = kmalloc(sizeof(CsrWifiSmeApWpsConfigurationCfm), GFP_KERNEL); \
645 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_CONFIGURATION_CFM, dst__, src__); \
646 msg__->status = (status__);
648 #define CsrWifiSmeApWpsConfigurationCfmSendTo(dst__, src__, status__) \
650 CsrWifiSmeApWpsConfigurationCfm *msg__; \
651 CsrWifiSmeApWpsConfigurationCfmCreate(msg__, dst__, src__, status__); \
652 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
655 #define CsrWifiSmeApWpsConfigurationCfmSend(dst__, status__) \
656 CsrWifiSmeApWpsConfigurationCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
658 /*******************************************************************************
661 CsrWifiSmeApWpsRegistrationFinishedReqSend
664 This primitive tells SME that WPS registration procedure has finished
667 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
670 *******************************************************************************/
671 #define CsrWifiSmeApWpsRegistrationFinishedReqCreate(msg__, dst__, src__, interfaceTag__) \
672 msg__ = kmalloc(sizeof(CsrWifiSmeApWpsRegistrationFinishedReq), GFP_KERNEL); \
673 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_REGISTRATION_FINISHED_REQ, dst__, src__); \
674 msg__->interfaceTag = (interfaceTag__);
676 #define CsrWifiSmeApWpsRegistrationFinishedReqSendTo(dst__, src__, interfaceTag__) \
678 CsrWifiSmeApWpsRegistrationFinishedReq *msg__; \
679 CsrWifiSmeApWpsRegistrationFinishedReqCreate(msg__, dst__, src__, interfaceTag__); \
680 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
683 #define CsrWifiSmeApWpsRegistrationFinishedReqSend(src__, interfaceTag__) \
684 CsrWifiSmeApWpsRegistrationFinishedReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__)
686 /*******************************************************************************
689 CsrWifiSmeApWpsRegistrationFinishedCfmSend
692 A confirm for UNIFI_MGT_AP_WPS_REGISTRATION_FINISHED.request
695 queue - Destination Task Queue
699 *******************************************************************************/
700 #define CsrWifiSmeApWpsRegistrationFinishedCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
701 msg__ = kmalloc(sizeof(CsrWifiSmeApWpsRegistrationFinishedCfm), GFP_KERNEL); \
702 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_REGISTRATION_FINISHED_CFM, dst__, src__); \
703 msg__->interfaceTag = (interfaceTag__); \
704 msg__->status = (status__);
706 #define CsrWifiSmeApWpsRegistrationFinishedCfmSendTo(dst__, src__, interfaceTag__, status__) \
708 CsrWifiSmeApWpsRegistrationFinishedCfm *msg__; \
709 CsrWifiSmeApWpsRegistrationFinishedCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
710 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
713 #define CsrWifiSmeApWpsRegistrationFinishedCfmSend(dst__, interfaceTag__, status__) \
714 CsrWifiSmeApWpsRegistrationFinishedCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
716 /*******************************************************************************
719 CsrWifiSmeApWpsRegistrationStartedReqSend
722 This primitive tells SME that WPS registration procedure has started
725 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
727 SelectedDevicePasswordId -
728 SelectedconfigMethod -
730 *******************************************************************************/
731 #define CsrWifiSmeApWpsRegistrationStartedReqCreate(msg__, dst__, src__, interfaceTag__, SelectedDevicePasswordId__, SelectedconfigMethod__) \
732 msg__ = kmalloc(sizeof(CsrWifiSmeApWpsRegistrationStartedReq), GFP_KERNEL); \
733 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_REGISTRATION_STARTED_REQ, dst__, src__); \
734 msg__->interfaceTag = (interfaceTag__); \
735 msg__->SelectedDevicePasswordId = (SelectedDevicePasswordId__); \
736 msg__->SelectedconfigMethod = (SelectedconfigMethod__);
738 #define CsrWifiSmeApWpsRegistrationStartedReqSendTo(dst__, src__, interfaceTag__, SelectedDevicePasswordId__, SelectedconfigMethod__) \
740 CsrWifiSmeApWpsRegistrationStartedReq *msg__; \
741 CsrWifiSmeApWpsRegistrationStartedReqCreate(msg__, dst__, src__, interfaceTag__, SelectedDevicePasswordId__, SelectedconfigMethod__); \
742 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
745 #define CsrWifiSmeApWpsRegistrationStartedReqSend(src__, interfaceTag__, SelectedDevicePasswordId__, SelectedconfigMethod__) \
746 CsrWifiSmeApWpsRegistrationStartedReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__, SelectedDevicePasswordId__, SelectedconfigMethod__)
748 /*******************************************************************************
751 CsrWifiSmeApWpsRegistrationStartedCfmSend
754 A confirm for UNIFI_MGT_AP_WPS_REGISTRATION_STARTED.request
757 queue - Destination Task Queue
761 *******************************************************************************/
762 #define CsrWifiSmeApWpsRegistrationStartedCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
763 msg__ = kmalloc(sizeof(CsrWifiSmeApWpsRegistrationStartedCfm), GFP_KERNEL); \
764 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_REGISTRATION_STARTED_CFM, dst__, src__); \
765 msg__->interfaceTag = (interfaceTag__); \
766 msg__->status = (status__);
768 #define CsrWifiSmeApWpsRegistrationStartedCfmSendTo(dst__, src__, interfaceTag__, status__) \
770 CsrWifiSmeApWpsRegistrationStartedCfm *msg__; \
771 CsrWifiSmeApWpsRegistrationStartedCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
772 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
775 #define CsrWifiSmeApWpsRegistrationStartedCfmSend(dst__, interfaceTag__, status__) \
776 CsrWifiSmeApWpsRegistrationStartedCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
783 #endif /* CSR_WIFI_SME_AP_LIB_H__ */