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_LIB_H__
14 #define CSR_WIFI_SME_LIB_H__
17 #include "csr_sched.h"
19 #include "csr_msg_transport.h"
21 #include "csr_wifi_lib.h"
23 #include "csr_wifi_sme_prim.h"
24 #include "csr_wifi_sme_task.h"
27 #ifndef CSR_WIFI_SME_LIB_DESTINATION_QUEUE
28 # ifdef CSR_WIFI_NME_ENABLE
29 # include "csr_wifi_nme_task.h"
30 # define CSR_WIFI_SME_LIB_DESTINATION_QUEUE CSR_WIFI_NME_IFACEQUEUE
32 # define CSR_WIFI_SME_LIB_DESTINATION_QUEUE CSR_WIFI_SME_IFACEQUEUE
41 /*----------------------------------------------------------------------------*
42 * CsrWifiSmeFreeUpstreamMessageContents
45 * Free the allocated memory in a CSR_WIFI_SME upstream message. Does not
46 * free the message itself, and can only be used for upstream messages.
49 * Deallocates the resources in a CSR_WIFI_SME upstream message
50 *----------------------------------------------------------------------------*/
51 void CsrWifiSmeFreeUpstreamMessageContents(u16 eventClass, void *message);
53 /*----------------------------------------------------------------------------*
54 * CsrWifiSmeFreeDownstreamMessageContents
57 * Free the allocated memory in a CSR_WIFI_SME downstream message. Does not
58 * free the message itself, and can only be used for downstream messages.
61 * Deallocates the resources in a CSR_WIFI_SME downstream message
62 *----------------------------------------------------------------------------*/
63 void CsrWifiSmeFreeDownstreamMessageContents(u16 eventClass, void *message);
65 /*----------------------------------------------------------------------------*
66 * Enum to string functions
67 *----------------------------------------------------------------------------*/
68 const char* CsrWifiSme80211NetworkTypeToString(CsrWifiSme80211NetworkType value);
69 const char* CsrWifiSme80211PrivacyModeToString(CsrWifiSme80211PrivacyMode value);
70 const char* CsrWifiSme80211dTrustLevelToString(CsrWifiSme80211dTrustLevel value);
71 const char* CsrWifiSmeAmpStatusToString(CsrWifiSmeAmpStatus value);
72 const char* CsrWifiSmeAuthModeToString(CsrWifiSmeAuthMode value);
73 const char* CsrWifiSmeBasicUsabilityToString(CsrWifiSmeBasicUsability value);
74 const char* CsrWifiSmeBssTypeToString(CsrWifiSmeBssType value);
75 const char* CsrWifiSmeCoexSchemeToString(CsrWifiSmeCoexScheme value);
76 const char* CsrWifiSmeControlIndicationToString(CsrWifiSmeControlIndication value);
77 const char* CsrWifiSmeCtsProtectionTypeToString(CsrWifiSmeCtsProtectionType value);
78 const char* CsrWifiSmeD3AutoScanModeToString(CsrWifiSmeD3AutoScanMode value);
79 const char* CsrWifiSmeEncryptionToString(CsrWifiSmeEncryption value);
80 const char* CsrWifiSmeFirmwareDriverInterfaceToString(CsrWifiSmeFirmwareDriverInterface value);
81 const char* CsrWifiSmeHostPowerModeToString(CsrWifiSmeHostPowerMode value);
82 const char* CsrWifiSmeIEEE80211ReasonToString(CsrWifiSmeIEEE80211Reason value);
83 const char* CsrWifiSmeIEEE80211ResultToString(CsrWifiSmeIEEE80211Result value);
84 const char* CsrWifiSmeIndicationsToString(CsrWifiSmeIndications value);
85 const char* CsrWifiSmeKeyTypeToString(CsrWifiSmeKeyType value);
86 const char* CsrWifiSmeListActionToString(CsrWifiSmeListAction value);
87 const char* CsrWifiSmeMediaStatusToString(CsrWifiSmeMediaStatus value);
88 const char* CsrWifiSmeP2pCapabilityToString(CsrWifiSmeP2pCapability value);
89 const char* CsrWifiSmeP2pGroupCapabilityToString(CsrWifiSmeP2pGroupCapability value);
90 const char* CsrWifiSmeP2pNoaConfigMethodToString(CsrWifiSmeP2pNoaConfigMethod value);
91 const char* CsrWifiSmeP2pRoleToString(CsrWifiSmeP2pRole value);
92 const char* CsrWifiSmeP2pStatusToString(CsrWifiSmeP2pStatus value);
93 const char* CsrWifiSmePacketFilterModeToString(CsrWifiSmePacketFilterMode value);
94 const char* CsrWifiSmePowerSaveLevelToString(CsrWifiSmePowerSaveLevel value);
95 const char* CsrWifiSmePreambleTypeToString(CsrWifiSmePreambleType value);
96 const char* CsrWifiSmeRadioIFToString(CsrWifiSmeRadioIF value);
97 const char* CsrWifiSmeRegulatoryDomainToString(CsrWifiSmeRegulatoryDomain value);
98 const char* CsrWifiSmeRoamReasonToString(CsrWifiSmeRoamReason value);
99 const char* CsrWifiSmeScanTypeToString(CsrWifiSmeScanType value);
100 const char* CsrWifiSmeTrafficTypeToString(CsrWifiSmeTrafficType value);
101 const char* CsrWifiSmeTspecCtrlToString(CsrWifiSmeTspecCtrl value);
102 const char* CsrWifiSmeTspecResultCodeToString(CsrWifiSmeTspecResultCode value);
103 const char* CsrWifiSmeWepAuthModeToString(CsrWifiSmeWepAuthMode value);
104 const char* CsrWifiSmeWepCredentialTypeToString(CsrWifiSmeWepCredentialType value);
105 const char* CsrWifiSmeWmmModeToString(CsrWifiSmeWmmMode value);
106 const char* CsrWifiSmeWmmQosInfoToString(CsrWifiSmeWmmQosInfo value);
107 const char* CsrWifiSmeWpsConfigTypeToString(CsrWifiSmeWpsConfigType value);
108 const char* CsrWifiSmeWpsDeviceCategoryToString(CsrWifiSmeWpsDeviceCategory value);
109 const char* CsrWifiSmeWpsDeviceSubCategoryToString(CsrWifiSmeWpsDeviceSubCategory value);
110 const char* CsrWifiSmeWpsDpidToString(CsrWifiSmeWpsDpid value);
111 const char* CsrWifiSmeWpsRegistrationToString(CsrWifiSmeWpsRegistration value);
114 /*----------------------------------------------------------------------------*
115 * CsrPrim Type toString function.
116 * Converts a message type to the String name of the Message
117 *----------------------------------------------------------------------------*/
118 const char* CsrWifiSmePrimTypeToString(CsrPrim msgType);
120 /*----------------------------------------------------------------------------*
121 * Lookup arrays for PrimType name Strings
122 *----------------------------------------------------------------------------*/
123 extern const char *CsrWifiSmeUpstreamPrimNames[CSR_WIFI_SME_PRIM_UPSTREAM_COUNT];
124 extern const char *CsrWifiSmeDownstreamPrimNames[CSR_WIFI_SME_PRIM_DOWNSTREAM_COUNT];
126 /*******************************************************************************
129 CsrWifiSmeActivateReqSend
132 The WMA sends this primitive to activate the SME.
133 The WMA must activate the SME before it can send any other primitive.
136 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
138 *******************************************************************************/
139 #define CsrWifiSmeActivateReqCreate(msg__, dst__, src__) \
140 msg__ = (CsrWifiSmeActivateReq *) CsrPmemAlloc(sizeof(CsrWifiSmeActivateReq)); \
141 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ACTIVATE_REQ, dst__, src__);
143 #define CsrWifiSmeActivateReqSendTo(dst__, src__) \
145 CsrWifiSmeActivateReq *msg__; \
146 CsrWifiSmeActivateReqCreate(msg__, dst__, src__); \
147 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
150 #define CsrWifiSmeActivateReqSend(src__) \
151 CsrWifiSmeActivateReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
153 /*******************************************************************************
156 CsrWifiSmeActivateCfmSend
159 The SME sends this primitive when the activation is complete.
162 queue - Destination Task Queue
163 status - Reports the result of the request
165 *******************************************************************************/
166 #define CsrWifiSmeActivateCfmCreate(msg__, dst__, src__, status__) \
167 msg__ = (CsrWifiSmeActivateCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeActivateCfm)); \
168 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ACTIVATE_CFM, dst__, src__); \
169 msg__->status = (status__);
171 #define CsrWifiSmeActivateCfmSendTo(dst__, src__, status__) \
173 CsrWifiSmeActivateCfm *msg__; \
174 CsrWifiSmeActivateCfmCreate(msg__, dst__, src__, status__); \
175 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
178 #define CsrWifiSmeActivateCfmSend(dst__, status__) \
179 CsrWifiSmeActivateCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
181 /*******************************************************************************
184 CsrWifiSmeAdhocConfigGetReqSend
187 This primitive gets the value of the adHocConfig parameter.
190 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
192 *******************************************************************************/
193 #define CsrWifiSmeAdhocConfigGetReqCreate(msg__, dst__, src__) \
194 msg__ = (CsrWifiSmeAdhocConfigGetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeAdhocConfigGetReq)); \
195 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ADHOC_CONFIG_GET_REQ, dst__, src__);
197 #define CsrWifiSmeAdhocConfigGetReqSendTo(dst__, src__) \
199 CsrWifiSmeAdhocConfigGetReq *msg__; \
200 CsrWifiSmeAdhocConfigGetReqCreate(msg__, dst__, src__); \
201 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
204 #define CsrWifiSmeAdhocConfigGetReqSend(src__) \
205 CsrWifiSmeAdhocConfigGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
207 /*******************************************************************************
210 CsrWifiSmeAdhocConfigGetCfmSend
213 This primitive reports the result of the request.
216 queue - Destination Task Queue
217 status - Reports the result of the request
218 adHocConfig - Contains the values used when starting an Ad-hoc (IBSS)
221 *******************************************************************************/
222 #define CsrWifiSmeAdhocConfigGetCfmCreate(msg__, dst__, src__, status__, adHocConfig__) \
223 msg__ = (CsrWifiSmeAdhocConfigGetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeAdhocConfigGetCfm)); \
224 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ADHOC_CONFIG_GET_CFM, dst__, src__); \
225 msg__->status = (status__); \
226 msg__->adHocConfig = (adHocConfig__);
228 #define CsrWifiSmeAdhocConfigGetCfmSendTo(dst__, src__, status__, adHocConfig__) \
230 CsrWifiSmeAdhocConfigGetCfm *msg__; \
231 CsrWifiSmeAdhocConfigGetCfmCreate(msg__, dst__, src__, status__, adHocConfig__); \
232 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
235 #define CsrWifiSmeAdhocConfigGetCfmSend(dst__, status__, adHocConfig__) \
236 CsrWifiSmeAdhocConfigGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, adHocConfig__)
238 /*******************************************************************************
241 CsrWifiSmeAdhocConfigSetReqSend
244 This primitive sets the value of the adHocConfig parameter.
247 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
248 adHocConfig - Sets the values to use when starting an ad hoc network.
250 *******************************************************************************/
251 #define CsrWifiSmeAdhocConfigSetReqCreate(msg__, dst__, src__, adHocConfig__) \
252 msg__ = (CsrWifiSmeAdhocConfigSetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeAdhocConfigSetReq)); \
253 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ADHOC_CONFIG_SET_REQ, dst__, src__); \
254 msg__->adHocConfig = (adHocConfig__);
256 #define CsrWifiSmeAdhocConfigSetReqSendTo(dst__, src__, adHocConfig__) \
258 CsrWifiSmeAdhocConfigSetReq *msg__; \
259 CsrWifiSmeAdhocConfigSetReqCreate(msg__, dst__, src__, adHocConfig__); \
260 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
263 #define CsrWifiSmeAdhocConfigSetReqSend(src__, adHocConfig__) \
264 CsrWifiSmeAdhocConfigSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, adHocConfig__)
266 /*******************************************************************************
269 CsrWifiSmeAdhocConfigSetCfmSend
272 This primitive reports the result of the request.
275 queue - Destination Task Queue
276 status - Reports the result of the request
278 *******************************************************************************/
279 #define CsrWifiSmeAdhocConfigSetCfmCreate(msg__, dst__, src__, status__) \
280 msg__ = (CsrWifiSmeAdhocConfigSetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeAdhocConfigSetCfm)); \
281 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ADHOC_CONFIG_SET_CFM, dst__, src__); \
282 msg__->status = (status__);
284 #define CsrWifiSmeAdhocConfigSetCfmSendTo(dst__, src__, status__) \
286 CsrWifiSmeAdhocConfigSetCfm *msg__; \
287 CsrWifiSmeAdhocConfigSetCfmCreate(msg__, dst__, src__, status__); \
288 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
291 #define CsrWifiSmeAdhocConfigSetCfmSend(dst__, status__) \
292 CsrWifiSmeAdhocConfigSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
294 /*******************************************************************************
297 CsrWifiSmeAmpStatusChangeIndSend
300 Indication of change to AMP activity.
303 queue - Destination Task Queue
304 interfaceTag - Interface on which the AMP activity changed.
305 ampStatus - The new status of AMP activity.Range: {AMP_ACTIVE,
308 *******************************************************************************/
309 #define CsrWifiSmeAmpStatusChangeIndCreate(msg__, dst__, src__, interfaceTag__, ampStatus__) \
310 msg__ = (CsrWifiSmeAmpStatusChangeInd *) CsrPmemAlloc(sizeof(CsrWifiSmeAmpStatusChangeInd)); \
311 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_AMP_STATUS_CHANGE_IND, dst__, src__); \
312 msg__->interfaceTag = (interfaceTag__); \
313 msg__->ampStatus = (ampStatus__);
315 #define CsrWifiSmeAmpStatusChangeIndSendTo(dst__, src__, interfaceTag__, ampStatus__) \
317 CsrWifiSmeAmpStatusChangeInd *msg__; \
318 CsrWifiSmeAmpStatusChangeIndCreate(msg__, dst__, src__, interfaceTag__, ampStatus__); \
319 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
322 #define CsrWifiSmeAmpStatusChangeIndSend(dst__, interfaceTag__, ampStatus__) \
323 CsrWifiSmeAmpStatusChangeIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, ampStatus__)
325 /*******************************************************************************
328 CsrWifiSmeAssociationCompleteIndSend
331 The SME will send this primitive to all the tasks that have registered to
332 receive it whenever it completes an attempt to associate with an AP. If
333 the association was successful, status will be set to
334 CSR_WIFI_SME_STATUS_SUCCESS, otherwise status and deauthReason shall be
335 set to appropriate error codes.
338 queue - Destination Task Queue
339 interfaceTag - Interface Identifier; unique identifier of an interface
340 status - Reports the result of the association procedure
341 connectionInfo - This parameter is relevant only if result is
342 CSR_WIFI_SME_STATUS_SUCCESS:
343 it points to the connection information for the new network
344 deauthReason - This parameter is relevant only if result is not
345 CSR_WIFI_SME_STATUS_SUCCESS:
346 if the AP deauthorised the station, it gives the reason of
349 *******************************************************************************/
350 #define CsrWifiSmeAssociationCompleteIndCreate(msg__, dst__, src__, interfaceTag__, status__, connectionInfo__, deauthReason__) \
351 msg__ = (CsrWifiSmeAssociationCompleteInd *) CsrPmemAlloc(sizeof(CsrWifiSmeAssociationCompleteInd)); \
352 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ASSOCIATION_COMPLETE_IND, dst__, src__); \
353 msg__->interfaceTag = (interfaceTag__); \
354 msg__->status = (status__); \
355 msg__->connectionInfo = (connectionInfo__); \
356 msg__->deauthReason = (deauthReason__);
358 #define CsrWifiSmeAssociationCompleteIndSendTo(dst__, src__, interfaceTag__, status__, connectionInfo__, deauthReason__) \
360 CsrWifiSmeAssociationCompleteInd *msg__; \
361 CsrWifiSmeAssociationCompleteIndCreate(msg__, dst__, src__, interfaceTag__, status__, connectionInfo__, deauthReason__); \
362 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
365 #define CsrWifiSmeAssociationCompleteIndSend(dst__, interfaceTag__, status__, connectionInfo__, deauthReason__) \
366 CsrWifiSmeAssociationCompleteIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, connectionInfo__, deauthReason__)
368 /*******************************************************************************
371 CsrWifiSmeAssociationStartIndSend
374 The SME will send this primitive to all the tasks that have registered to
375 receive it whenever it begins an attempt to associate with an AP.
378 queue - Destination Task Queue
379 interfaceTag - Interface Identifier; unique identifier of an interface
380 address - BSSID of the associating network
381 ssid - Service Set identifier of the associating network
383 *******************************************************************************/
384 #define CsrWifiSmeAssociationStartIndCreate(msg__, dst__, src__, interfaceTag__, address__, ssid__) \
385 msg__ = (CsrWifiSmeAssociationStartInd *) CsrPmemAlloc(sizeof(CsrWifiSmeAssociationStartInd)); \
386 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ASSOCIATION_START_IND, dst__, src__); \
387 msg__->interfaceTag = (interfaceTag__); \
388 msg__->address = (address__); \
389 msg__->ssid = (ssid__);
391 #define CsrWifiSmeAssociationStartIndSendTo(dst__, src__, interfaceTag__, address__, ssid__) \
393 CsrWifiSmeAssociationStartInd *msg__; \
394 CsrWifiSmeAssociationStartIndCreate(msg__, dst__, src__, interfaceTag__, address__, ssid__); \
395 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
398 #define CsrWifiSmeAssociationStartIndSend(dst__, interfaceTag__, address__, ssid__) \
399 CsrWifiSmeAssociationStartIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, address__, ssid__)
401 /*******************************************************************************
404 CsrWifiSmeBlacklistReqSend
407 The wireless manager application should call this primitive to notify the
408 driver of any networks that should not be connected to. The interface
409 allows the wireless manager application to query, add, remove, and flush
410 the BSSIDs that the driver may not connect or roam to.
411 When this primitive adds to the black list the BSSID to which the SME is
412 currently connected, the SME will try to roam, if applicable, to another
413 BSSID in the same ESS; if the roaming procedure fails, the SME will
417 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
418 interfaceTag - Interface Identifier; unique identifier of an interface
419 action - The value of the CsrWifiSmeListAction parameter instructs
420 the driver to modify or provide the list of blacklisted
422 setAddressCount - Number of BSSIDs sent with this primitive
423 setAddresses - Pointer to the list of BBSIDs sent with the primitive, set
424 to NULL if none is sent.
426 *******************************************************************************/
427 #define CsrWifiSmeBlacklistReqCreate(msg__, dst__, src__, interfaceTag__, action__, setAddressCount__, setAddresses__) \
428 msg__ = (CsrWifiSmeBlacklistReq *) CsrPmemAlloc(sizeof(CsrWifiSmeBlacklistReq)); \
429 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_BLACKLIST_REQ, dst__, src__); \
430 msg__->interfaceTag = (interfaceTag__); \
431 msg__->action = (action__); \
432 msg__->setAddressCount = (setAddressCount__); \
433 msg__->setAddresses = (setAddresses__);
435 #define CsrWifiSmeBlacklistReqSendTo(dst__, src__, interfaceTag__, action__, setAddressCount__, setAddresses__) \
437 CsrWifiSmeBlacklistReq *msg__; \
438 CsrWifiSmeBlacklistReqCreate(msg__, dst__, src__, interfaceTag__, action__, setAddressCount__, setAddresses__); \
439 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
442 #define CsrWifiSmeBlacklistReqSend(src__, interfaceTag__, action__, setAddressCount__, setAddresses__) \
443 CsrWifiSmeBlacklistReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__, action__, setAddressCount__, setAddresses__)
445 /*******************************************************************************
448 CsrWifiSmeBlacklistCfmSend
451 The SME will call this primitive when the action on the blacklist has
452 completed. For a GET action, this primitive also reports the list of
453 BBSIDs in the blacklist.
456 queue - Destination Task Queue
457 interfaceTag - Interface Identifier; unique identifier of an interface
458 status - Reports the result of the request
459 action - Action in the request
460 getAddressCount - This parameter is only relevant if action is
461 CSR_WIFI_SME_LIST_ACTION_GET:
462 number of BSSIDs sent with this primitive
463 getAddresses - Pointer to the list of BBSIDs sent with the primitive, set
464 to NULL if none is sent.
466 *******************************************************************************/
467 #define CsrWifiSmeBlacklistCfmCreate(msg__, dst__, src__, interfaceTag__, status__, action__, getAddressCount__, getAddresses__) \
468 msg__ = (CsrWifiSmeBlacklistCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeBlacklistCfm)); \
469 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_BLACKLIST_CFM, dst__, src__); \
470 msg__->interfaceTag = (interfaceTag__); \
471 msg__->status = (status__); \
472 msg__->action = (action__); \
473 msg__->getAddressCount = (getAddressCount__); \
474 msg__->getAddresses = (getAddresses__);
476 #define CsrWifiSmeBlacklistCfmSendTo(dst__, src__, interfaceTag__, status__, action__, getAddressCount__, getAddresses__) \
478 CsrWifiSmeBlacklistCfm *msg__; \
479 CsrWifiSmeBlacklistCfmCreate(msg__, dst__, src__, interfaceTag__, status__, action__, getAddressCount__, getAddresses__); \
480 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
483 #define CsrWifiSmeBlacklistCfmSend(dst__, interfaceTag__, status__, action__, getAddressCount__, getAddresses__) \
484 CsrWifiSmeBlacklistCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, action__, getAddressCount__, getAddresses__)
486 /*******************************************************************************
489 CsrWifiSmeCalibrationDataGetReqSend
492 This primitive retrieves the Wi-Fi radio calibration data.
495 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
497 *******************************************************************************/
498 #define CsrWifiSmeCalibrationDataGetReqCreate(msg__, dst__, src__) \
499 msg__ = (CsrWifiSmeCalibrationDataGetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeCalibrationDataGetReq)); \
500 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CALIBRATION_DATA_GET_REQ, dst__, src__);
502 #define CsrWifiSmeCalibrationDataGetReqSendTo(dst__, src__) \
504 CsrWifiSmeCalibrationDataGetReq *msg__; \
505 CsrWifiSmeCalibrationDataGetReqCreate(msg__, dst__, src__); \
506 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
509 #define CsrWifiSmeCalibrationDataGetReqSend(src__) \
510 CsrWifiSmeCalibrationDataGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
512 /*******************************************************************************
515 CsrWifiSmeCalibrationDataGetCfmSend
518 This primitive reports the result of the request.
521 queue - Destination Task Queue
522 status - Reports the result of the request
523 calibrationDataLength - Number of bytes in the buffer pointed by
525 calibrationData - Pointer to a buffer of length calibrationDataLength
526 containing the calibration data
528 *******************************************************************************/
529 #define CsrWifiSmeCalibrationDataGetCfmCreate(msg__, dst__, src__, status__, calibrationDataLength__, calibrationData__) \
530 msg__ = (CsrWifiSmeCalibrationDataGetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeCalibrationDataGetCfm)); \
531 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CALIBRATION_DATA_GET_CFM, dst__, src__); \
532 msg__->status = (status__); \
533 msg__->calibrationDataLength = (calibrationDataLength__); \
534 msg__->calibrationData = (calibrationData__);
536 #define CsrWifiSmeCalibrationDataGetCfmSendTo(dst__, src__, status__, calibrationDataLength__, calibrationData__) \
538 CsrWifiSmeCalibrationDataGetCfm *msg__; \
539 CsrWifiSmeCalibrationDataGetCfmCreate(msg__, dst__, src__, status__, calibrationDataLength__, calibrationData__); \
540 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
543 #define CsrWifiSmeCalibrationDataGetCfmSend(dst__, status__, calibrationDataLength__, calibrationData__) \
544 CsrWifiSmeCalibrationDataGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, calibrationDataLength__, calibrationData__)
546 /*******************************************************************************
549 CsrWifiSmeCalibrationDataSetReqSend
552 This primitive sets the Wi-Fi radio calibration data.
553 The usage of the primitive with proper calibration data will avoid
554 time-consuming configuration after power-up.
557 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
558 calibrationDataLength - Number of bytes in the buffer pointed by
560 calibrationData - Pointer to a buffer of length calibrationDataLength
561 containing the calibration data
563 *******************************************************************************/
564 #define CsrWifiSmeCalibrationDataSetReqCreate(msg__, dst__, src__, calibrationDataLength__, calibrationData__) \
565 msg__ = (CsrWifiSmeCalibrationDataSetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeCalibrationDataSetReq)); \
566 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CALIBRATION_DATA_SET_REQ, dst__, src__); \
567 msg__->calibrationDataLength = (calibrationDataLength__); \
568 msg__->calibrationData = (calibrationData__);
570 #define CsrWifiSmeCalibrationDataSetReqSendTo(dst__, src__, calibrationDataLength__, calibrationData__) \
572 CsrWifiSmeCalibrationDataSetReq *msg__; \
573 CsrWifiSmeCalibrationDataSetReqCreate(msg__, dst__, src__, calibrationDataLength__, calibrationData__); \
574 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
577 #define CsrWifiSmeCalibrationDataSetReqSend(src__, calibrationDataLength__, calibrationData__) \
578 CsrWifiSmeCalibrationDataSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, calibrationDataLength__, calibrationData__)
580 /*******************************************************************************
583 CsrWifiSmeCalibrationDataSetCfmSend
586 This primitive reports the result of the request.
589 queue - Destination Task Queue
590 status - Reports the result of the request
592 *******************************************************************************/
593 #define CsrWifiSmeCalibrationDataSetCfmCreate(msg__, dst__, src__, status__) \
594 msg__ = (CsrWifiSmeCalibrationDataSetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeCalibrationDataSetCfm)); \
595 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CALIBRATION_DATA_SET_CFM, dst__, src__); \
596 msg__->status = (status__);
598 #define CsrWifiSmeCalibrationDataSetCfmSendTo(dst__, src__, status__) \
600 CsrWifiSmeCalibrationDataSetCfm *msg__; \
601 CsrWifiSmeCalibrationDataSetCfmCreate(msg__, dst__, src__, status__); \
602 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
605 #define CsrWifiSmeCalibrationDataSetCfmSend(dst__, status__) \
606 CsrWifiSmeCalibrationDataSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
608 /*******************************************************************************
611 CsrWifiSmeCcxConfigGetReqSend
614 This primitive gets the value of the CcxConfig parameter.
615 CURRENTLY NOT SUPPORTED.
618 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
619 interfaceTag - Interface Identifier; unique identifier of an interface
621 *******************************************************************************/
622 #define CsrWifiSmeCcxConfigGetReqCreate(msg__, dst__, src__, interfaceTag__) \
623 msg__ = (CsrWifiSmeCcxConfigGetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeCcxConfigGetReq)); \
624 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CCX_CONFIG_GET_REQ, dst__, src__); \
625 msg__->interfaceTag = (interfaceTag__);
627 #define CsrWifiSmeCcxConfigGetReqSendTo(dst__, src__, interfaceTag__) \
629 CsrWifiSmeCcxConfigGetReq *msg__; \
630 CsrWifiSmeCcxConfigGetReqCreate(msg__, dst__, src__, interfaceTag__); \
631 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
634 #define CsrWifiSmeCcxConfigGetReqSend(src__, interfaceTag__) \
635 CsrWifiSmeCcxConfigGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__)
637 /*******************************************************************************
640 CsrWifiSmeCcxConfigGetCfmSend
643 This primitive reports the result of the request.
646 queue - Destination Task Queue
647 interfaceTag - Interface Identifier; unique identifier of an interface
648 status - Reports the result of the request
649 ccxConfig - Currently not supported
651 *******************************************************************************/
652 #define CsrWifiSmeCcxConfigGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, ccxConfig__) \
653 msg__ = (CsrWifiSmeCcxConfigGetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeCcxConfigGetCfm)); \
654 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CCX_CONFIG_GET_CFM, dst__, src__); \
655 msg__->interfaceTag = (interfaceTag__); \
656 msg__->status = (status__); \
657 msg__->ccxConfig = (ccxConfig__);
659 #define CsrWifiSmeCcxConfigGetCfmSendTo(dst__, src__, interfaceTag__, status__, ccxConfig__) \
661 CsrWifiSmeCcxConfigGetCfm *msg__; \
662 CsrWifiSmeCcxConfigGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, ccxConfig__); \
663 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
666 #define CsrWifiSmeCcxConfigGetCfmSend(dst__, interfaceTag__, status__, ccxConfig__) \
667 CsrWifiSmeCcxConfigGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, ccxConfig__)
669 /*******************************************************************************
672 CsrWifiSmeCcxConfigSetReqSend
675 This primitive sets the value of the CcxConfig parameter.
676 CURRENTLY NOT SUPPORTED.
679 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
680 interfaceTag - Interface Identifier; unique identifier of an interface
681 ccxConfig - Currently not supported
683 *******************************************************************************/
684 #define CsrWifiSmeCcxConfigSetReqCreate(msg__, dst__, src__, interfaceTag__, ccxConfig__) \
685 msg__ = (CsrWifiSmeCcxConfigSetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeCcxConfigSetReq)); \
686 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CCX_CONFIG_SET_REQ, dst__, src__); \
687 msg__->interfaceTag = (interfaceTag__); \
688 msg__->ccxConfig = (ccxConfig__);
690 #define CsrWifiSmeCcxConfigSetReqSendTo(dst__, src__, interfaceTag__, ccxConfig__) \
692 CsrWifiSmeCcxConfigSetReq *msg__; \
693 CsrWifiSmeCcxConfigSetReqCreate(msg__, dst__, src__, interfaceTag__, ccxConfig__); \
694 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
697 #define CsrWifiSmeCcxConfigSetReqSend(src__, interfaceTag__, ccxConfig__) \
698 CsrWifiSmeCcxConfigSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__, ccxConfig__)
700 /*******************************************************************************
703 CsrWifiSmeCcxConfigSetCfmSend
706 This primitive reports the result of the request.
709 queue - Destination Task Queue
710 interfaceTag - Interface Identifier; unique identifier of an interface
711 status - Reports the result of the request
713 *******************************************************************************/
714 #define CsrWifiSmeCcxConfigSetCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
715 msg__ = (CsrWifiSmeCcxConfigSetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeCcxConfigSetCfm)); \
716 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CCX_CONFIG_SET_CFM, dst__, src__); \
717 msg__->interfaceTag = (interfaceTag__); \
718 msg__->status = (status__);
720 #define CsrWifiSmeCcxConfigSetCfmSendTo(dst__, src__, interfaceTag__, status__) \
722 CsrWifiSmeCcxConfigSetCfm *msg__; \
723 CsrWifiSmeCcxConfigSetCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
724 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
727 #define CsrWifiSmeCcxConfigSetCfmSend(dst__, interfaceTag__, status__) \
728 CsrWifiSmeCcxConfigSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
730 /*******************************************************************************
733 CsrWifiSmeCloakedSsidsGetReqSend
736 This primitive gets the value of the CloakedSsids parameter.
739 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
741 *******************************************************************************/
742 #define CsrWifiSmeCloakedSsidsGetReqCreate(msg__, dst__, src__) \
743 msg__ = (CsrWifiSmeCloakedSsidsGetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeCloakedSsidsGetReq)); \
744 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CLOAKED_SSIDS_GET_REQ, dst__, src__);
746 #define CsrWifiSmeCloakedSsidsGetReqSendTo(dst__, src__) \
748 CsrWifiSmeCloakedSsidsGetReq *msg__; \
749 CsrWifiSmeCloakedSsidsGetReqCreate(msg__, dst__, src__); \
750 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
753 #define CsrWifiSmeCloakedSsidsGetReqSend(src__) \
754 CsrWifiSmeCloakedSsidsGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
756 /*******************************************************************************
759 CsrWifiSmeCloakedSsidsGetCfmSend
762 This primitive reports the result of the request.
765 queue - Destination Task Queue
766 status - Reports the result of the request
767 cloakedSsids - Reports list of cloaked SSIDs that are explicitly scanned for
770 *******************************************************************************/
771 #define CsrWifiSmeCloakedSsidsGetCfmCreate(msg__, dst__, src__, status__, cloakedSsids__) \
772 msg__ = (CsrWifiSmeCloakedSsidsGetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeCloakedSsidsGetCfm)); \
773 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CLOAKED_SSIDS_GET_CFM, dst__, src__); \
774 msg__->status = (status__); \
775 msg__->cloakedSsids = (cloakedSsids__);
777 #define CsrWifiSmeCloakedSsidsGetCfmSendTo(dst__, src__, status__, cloakedSsids__) \
779 CsrWifiSmeCloakedSsidsGetCfm *msg__; \
780 CsrWifiSmeCloakedSsidsGetCfmCreate(msg__, dst__, src__, status__, cloakedSsids__); \
781 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
784 #define CsrWifiSmeCloakedSsidsGetCfmSend(dst__, status__, cloakedSsids__) \
785 CsrWifiSmeCloakedSsidsGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, cloakedSsids__)
787 /*******************************************************************************
790 CsrWifiSmeCloakedSsidsSetReqSend
793 This primitive sets the list of cloaked SSIDs for which the WMA possesses
795 When the driver detects a cloaked AP, the SME will explicitly scan for it
796 using the list of cloaked SSIDs provided it, and, if the scan succeeds,
797 it will report the AP to the WMA either via CSR_WIFI_SME_SCAN_RESULT_IND
798 (if registered) or via CSR_WIFI_SCAN_RESULT_GET_CFM.
801 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
802 cloakedSsids - Sets the list of cloaked SSIDs
804 *******************************************************************************/
805 #define CsrWifiSmeCloakedSsidsSetReqCreate(msg__, dst__, src__, cloakedSsids__) \
806 msg__ = (CsrWifiSmeCloakedSsidsSetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeCloakedSsidsSetReq)); \
807 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CLOAKED_SSIDS_SET_REQ, dst__, src__); \
808 msg__->cloakedSsids = (cloakedSsids__);
810 #define CsrWifiSmeCloakedSsidsSetReqSendTo(dst__, src__, cloakedSsids__) \
812 CsrWifiSmeCloakedSsidsSetReq *msg__; \
813 CsrWifiSmeCloakedSsidsSetReqCreate(msg__, dst__, src__, cloakedSsids__); \
814 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
817 #define CsrWifiSmeCloakedSsidsSetReqSend(src__, cloakedSsids__) \
818 CsrWifiSmeCloakedSsidsSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, cloakedSsids__)
820 /*******************************************************************************
823 CsrWifiSmeCloakedSsidsSetCfmSend
826 This primitive reports the result of the request.
829 queue - Destination Task Queue
830 status - Reports the result of the request
832 *******************************************************************************/
833 #define CsrWifiSmeCloakedSsidsSetCfmCreate(msg__, dst__, src__, status__) \
834 msg__ = (CsrWifiSmeCloakedSsidsSetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeCloakedSsidsSetCfm)); \
835 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CLOAKED_SSIDS_SET_CFM, dst__, src__); \
836 msg__->status = (status__);
838 #define CsrWifiSmeCloakedSsidsSetCfmSendTo(dst__, src__, status__) \
840 CsrWifiSmeCloakedSsidsSetCfm *msg__; \
841 CsrWifiSmeCloakedSsidsSetCfmCreate(msg__, dst__, src__, status__); \
842 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
845 #define CsrWifiSmeCloakedSsidsSetCfmSend(dst__, status__) \
846 CsrWifiSmeCloakedSsidsSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
848 /*******************************************************************************
851 CsrWifiSmeCoexConfigGetReqSend
854 This primitive gets the value of the CoexConfig parameter.
857 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
859 *******************************************************************************/
860 #define CsrWifiSmeCoexConfigGetReqCreate(msg__, dst__, src__) \
861 msg__ = (CsrWifiSmeCoexConfigGetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeCoexConfigGetReq)); \
862 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_COEX_CONFIG_GET_REQ, dst__, src__);
864 #define CsrWifiSmeCoexConfigGetReqSendTo(dst__, src__) \
866 CsrWifiSmeCoexConfigGetReq *msg__; \
867 CsrWifiSmeCoexConfigGetReqCreate(msg__, dst__, src__); \
868 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
871 #define CsrWifiSmeCoexConfigGetReqSend(src__) \
872 CsrWifiSmeCoexConfigGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
874 /*******************************************************************************
877 CsrWifiSmeCoexConfigGetCfmSend
880 This primitive reports the result of the request.
883 queue - Destination Task Queue
884 status - Reports the result of the request
885 coexConfig - Reports the parameters used to configure the coexistence
888 *******************************************************************************/
889 #define CsrWifiSmeCoexConfigGetCfmCreate(msg__, dst__, src__, status__, coexConfig__) \
890 msg__ = (CsrWifiSmeCoexConfigGetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeCoexConfigGetCfm)); \
891 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_COEX_CONFIG_GET_CFM, dst__, src__); \
892 msg__->status = (status__); \
893 msg__->coexConfig = (coexConfig__);
895 #define CsrWifiSmeCoexConfigGetCfmSendTo(dst__, src__, status__, coexConfig__) \
897 CsrWifiSmeCoexConfigGetCfm *msg__; \
898 CsrWifiSmeCoexConfigGetCfmCreate(msg__, dst__, src__, status__, coexConfig__); \
899 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
902 #define CsrWifiSmeCoexConfigGetCfmSend(dst__, status__, coexConfig__) \
903 CsrWifiSmeCoexConfigGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, coexConfig__)
905 /*******************************************************************************
908 CsrWifiSmeCoexConfigSetReqSend
911 This primitive sets the value of the CoexConfig parameter.
914 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
915 coexConfig - Configures the coexistence behaviour
917 *******************************************************************************/
918 #define CsrWifiSmeCoexConfigSetReqCreate(msg__, dst__, src__, coexConfig__) \
919 msg__ = (CsrWifiSmeCoexConfigSetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeCoexConfigSetReq)); \
920 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_COEX_CONFIG_SET_REQ, dst__, src__); \
921 msg__->coexConfig = (coexConfig__);
923 #define CsrWifiSmeCoexConfigSetReqSendTo(dst__, src__, coexConfig__) \
925 CsrWifiSmeCoexConfigSetReq *msg__; \
926 CsrWifiSmeCoexConfigSetReqCreate(msg__, dst__, src__, coexConfig__); \
927 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
930 #define CsrWifiSmeCoexConfigSetReqSend(src__, coexConfig__) \
931 CsrWifiSmeCoexConfigSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, coexConfig__)
933 /*******************************************************************************
936 CsrWifiSmeCoexConfigSetCfmSend
939 This primitive reports the result of the request.
942 queue - Destination Task Queue
943 status - Reports the result of the request
945 *******************************************************************************/
946 #define CsrWifiSmeCoexConfigSetCfmCreate(msg__, dst__, src__, status__) \
947 msg__ = (CsrWifiSmeCoexConfigSetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeCoexConfigSetCfm)); \
948 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_COEX_CONFIG_SET_CFM, dst__, src__); \
949 msg__->status = (status__);
951 #define CsrWifiSmeCoexConfigSetCfmSendTo(dst__, src__, status__) \
953 CsrWifiSmeCoexConfigSetCfm *msg__; \
954 CsrWifiSmeCoexConfigSetCfmCreate(msg__, dst__, src__, status__); \
955 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
958 #define CsrWifiSmeCoexConfigSetCfmSend(dst__, status__) \
959 CsrWifiSmeCoexConfigSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
961 /*******************************************************************************
964 CsrWifiSmeCoexInfoGetReqSend
967 This primitive gets the value of the CoexInfo parameter.
970 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
972 *******************************************************************************/
973 #define CsrWifiSmeCoexInfoGetReqCreate(msg__, dst__, src__) \
974 msg__ = (CsrWifiSmeCoexInfoGetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeCoexInfoGetReq)); \
975 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_COEX_INFO_GET_REQ, dst__, src__);
977 #define CsrWifiSmeCoexInfoGetReqSendTo(dst__, src__) \
979 CsrWifiSmeCoexInfoGetReq *msg__; \
980 CsrWifiSmeCoexInfoGetReqCreate(msg__, dst__, src__); \
981 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
984 #define CsrWifiSmeCoexInfoGetReqSend(src__) \
985 CsrWifiSmeCoexInfoGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
987 /*******************************************************************************
990 CsrWifiSmeCoexInfoGetCfmSend
993 This primitive reports the result of the request.
996 queue - Destination Task Queue
997 status - Reports the result of the request
998 coexInfo - Reports information and state related to coexistence.
1000 *******************************************************************************/
1001 #define CsrWifiSmeCoexInfoGetCfmCreate(msg__, dst__, src__, status__, coexInfo__) \
1002 msg__ = (CsrWifiSmeCoexInfoGetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeCoexInfoGetCfm)); \
1003 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_COEX_INFO_GET_CFM, dst__, src__); \
1004 msg__->status = (status__); \
1005 msg__->coexInfo = (coexInfo__);
1007 #define CsrWifiSmeCoexInfoGetCfmSendTo(dst__, src__, status__, coexInfo__) \
1009 CsrWifiSmeCoexInfoGetCfm *msg__; \
1010 CsrWifiSmeCoexInfoGetCfmCreate(msg__, dst__, src__, status__, coexInfo__); \
1011 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1014 #define CsrWifiSmeCoexInfoGetCfmSend(dst__, status__, coexInfo__) \
1015 CsrWifiSmeCoexInfoGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, coexInfo__)
1017 /*******************************************************************************
1020 CsrWifiSmeConnectReqSend
1023 The wireless manager application calls this primitive to start the
1024 process of joining an 802.11 wireless network or to start an ad hoc
1026 The structure pointed by connectionConfig contains parameters describing
1027 the network to join or, in case of an ad hoc network, to host or join.
1028 The SME will select a network, perform the IEEE 802.11 Join, Authenticate
1029 and Associate exchanges.
1030 The SME selects the networks from the current scan list that match both
1031 the SSID and BSSID, however either or both of these may be the wildcard
1032 value. Using this rule, the following operations are possible:
1033 * To connect to a network by name, specify the SSID and set the BSSID to
1034 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF. If there are two or more networks visible,
1035 the SME will select the one with the strongest signal.
1036 * To connect to a specific network, specify the BSSID. The SSID is
1037 optional, but if given it must match the SSID of the network. An empty
1038 SSID may be specified by setting the SSID length to zero. Please note
1039 that if the BSSID is specified (i.e. not equal to 0xFF 0xFF 0xFF 0xFF
1040 0xFF 0xFF), the SME will not attempt to roam if signal conditions become
1041 poor, even if there is an alternative AP with an SSID that matches the
1042 current network SSID.
1043 * To connect to any network matching the other parameters (i.e. security,
1044 etc), set the SSID length to zero and set the BSSID to 0xFF 0xFF 0xFF
1045 0xFF 0xFF 0xFF. In this case, the SME will order all available networks
1046 by their signal strengths and will iterate through this list until it
1047 successfully connects.
1048 NOTE: Specifying the BSSID will restrict the selection to one specific
1049 network. If SSID and BSSID are given, they must both match the network
1050 for it to be selected. To select a network based on the SSID only, the
1051 wireless manager application must set the BSSID to 0xFF 0xFF 0xFF 0xFF
1053 The SME will try to connect to each network that matches the provided
1054 parameters, one by one, until it succeeds or has tried unsuccessfully
1055 with all the matching networks.
1056 If there is no network that matches the parameters and the request allows
1057 to host an ad hoc network, the SME will advertise a new ad hoc network
1059 If the SME cannot connect, it will notify the failure in the confirm.
1062 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
1063 interfaceTag - Interface Identifier; unique identifier of an interface
1064 connectionConfig - Describes the candidate network to join or to host.
1066 *******************************************************************************/
1067 #define CsrWifiSmeConnectReqCreate(msg__, dst__, src__, interfaceTag__, connectionConfig__) \
1068 msg__ = (CsrWifiSmeConnectReq *) CsrPmemAlloc(sizeof(CsrWifiSmeConnectReq)); \
1069 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CONNECT_REQ, dst__, src__); \
1070 msg__->interfaceTag = (interfaceTag__); \
1071 msg__->connectionConfig = (connectionConfig__);
1073 #define CsrWifiSmeConnectReqSendTo(dst__, src__, interfaceTag__, connectionConfig__) \
1075 CsrWifiSmeConnectReq *msg__; \
1076 CsrWifiSmeConnectReqCreate(msg__, dst__, src__, interfaceTag__, connectionConfig__); \
1077 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
1080 #define CsrWifiSmeConnectReqSend(src__, interfaceTag__, connectionConfig__) \
1081 CsrWifiSmeConnectReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__, connectionConfig__)
1083 /*******************************************************************************
1086 CsrWifiSmeConnectCfmSend
1089 The SME calls this primitive when the connection exchange is complete or
1090 all connection attempts fail.
1093 queue - Destination Task Queue
1094 interfaceTag - Interface Identifier; unique identifier of an interface
1095 status - Reports the result of the request.
1096 CSR_WIFI_SME_STATUS_NOT_FOUND: all attempts by the SME to
1097 locate the requested AP failed
1099 *******************************************************************************/
1100 #define CsrWifiSmeConnectCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
1101 msg__ = (CsrWifiSmeConnectCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeConnectCfm)); \
1102 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CONNECT_CFM, dst__, src__); \
1103 msg__->interfaceTag = (interfaceTag__); \
1104 msg__->status = (status__);
1106 #define CsrWifiSmeConnectCfmSendTo(dst__, src__, interfaceTag__, status__) \
1108 CsrWifiSmeConnectCfm *msg__; \
1109 CsrWifiSmeConnectCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
1110 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1113 #define CsrWifiSmeConnectCfmSend(dst__, interfaceTag__, status__) \
1114 CsrWifiSmeConnectCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
1116 /*******************************************************************************
1119 CsrWifiSmeConnectionConfigGetReqSend
1122 This primitive gets the value of the ConnectionConfig parameter.
1125 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
1126 interfaceTag - Interface Identifier; unique identifier of an interface
1128 *******************************************************************************/
1129 #define CsrWifiSmeConnectionConfigGetReqCreate(msg__, dst__, src__, interfaceTag__) \
1130 msg__ = (CsrWifiSmeConnectionConfigGetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeConnectionConfigGetReq)); \
1131 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CONNECTION_CONFIG_GET_REQ, dst__, src__); \
1132 msg__->interfaceTag = (interfaceTag__);
1134 #define CsrWifiSmeConnectionConfigGetReqSendTo(dst__, src__, interfaceTag__) \
1136 CsrWifiSmeConnectionConfigGetReq *msg__; \
1137 CsrWifiSmeConnectionConfigGetReqCreate(msg__, dst__, src__, interfaceTag__); \
1138 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
1141 #define CsrWifiSmeConnectionConfigGetReqSend(src__, interfaceTag__) \
1142 CsrWifiSmeConnectionConfigGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__)
1144 /*******************************************************************************
1147 CsrWifiSmeConnectionConfigGetCfmSend
1150 This primitive reports the result of the request.
1153 queue - Destination Task Queue
1154 interfaceTag - Interface Identifier; unique identifier of an interface
1155 status - Reports the result of the request
1156 connectionConfig - Parameters used by the SME for selecting a network
1158 *******************************************************************************/
1159 #define CsrWifiSmeConnectionConfigGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, connectionConfig__) \
1160 msg__ = (CsrWifiSmeConnectionConfigGetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeConnectionConfigGetCfm)); \
1161 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CONNECTION_CONFIG_GET_CFM, dst__, src__); \
1162 msg__->interfaceTag = (interfaceTag__); \
1163 msg__->status = (status__); \
1164 msg__->connectionConfig = (connectionConfig__);
1166 #define CsrWifiSmeConnectionConfigGetCfmSendTo(dst__, src__, interfaceTag__, status__, connectionConfig__) \
1168 CsrWifiSmeConnectionConfigGetCfm *msg__; \
1169 CsrWifiSmeConnectionConfigGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, connectionConfig__); \
1170 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1173 #define CsrWifiSmeConnectionConfigGetCfmSend(dst__, interfaceTag__, status__, connectionConfig__) \
1174 CsrWifiSmeConnectionConfigGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, connectionConfig__)
1176 /*******************************************************************************
1179 CsrWifiSmeConnectionInfoGetReqSend
1182 This primitive gets the value of the ConnectionInfo parameter.
1185 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
1186 interfaceTag - Interface Identifier; unique identifier of an interface
1188 *******************************************************************************/
1189 #define CsrWifiSmeConnectionInfoGetReqCreate(msg__, dst__, src__, interfaceTag__) \
1190 msg__ = (CsrWifiSmeConnectionInfoGetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeConnectionInfoGetReq)); \
1191 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CONNECTION_INFO_GET_REQ, dst__, src__); \
1192 msg__->interfaceTag = (interfaceTag__);
1194 #define CsrWifiSmeConnectionInfoGetReqSendTo(dst__, src__, interfaceTag__) \
1196 CsrWifiSmeConnectionInfoGetReq *msg__; \
1197 CsrWifiSmeConnectionInfoGetReqCreate(msg__, dst__, src__, interfaceTag__); \
1198 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
1201 #define CsrWifiSmeConnectionInfoGetReqSend(src__, interfaceTag__) \
1202 CsrWifiSmeConnectionInfoGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__)
1204 /*******************************************************************************
1207 CsrWifiSmeConnectionInfoGetCfmSend
1210 This primitive reports the result of the request.
1213 queue - Destination Task Queue
1214 interfaceTag - Interface Identifier; unique identifier of an interface
1215 status - Reports the result of the request
1216 connectionInfo - Information about the current connection
1218 *******************************************************************************/
1219 #define CsrWifiSmeConnectionInfoGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, connectionInfo__) \
1220 msg__ = (CsrWifiSmeConnectionInfoGetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeConnectionInfoGetCfm)); \
1221 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CONNECTION_INFO_GET_CFM, dst__, src__); \
1222 msg__->interfaceTag = (interfaceTag__); \
1223 msg__->status = (status__); \
1224 msg__->connectionInfo = (connectionInfo__);
1226 #define CsrWifiSmeConnectionInfoGetCfmSendTo(dst__, src__, interfaceTag__, status__, connectionInfo__) \
1228 CsrWifiSmeConnectionInfoGetCfm *msg__; \
1229 CsrWifiSmeConnectionInfoGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, connectionInfo__); \
1230 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1233 #define CsrWifiSmeConnectionInfoGetCfmSend(dst__, interfaceTag__, status__, connectionInfo__) \
1234 CsrWifiSmeConnectionInfoGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, connectionInfo__)
1236 /*******************************************************************************
1239 CsrWifiSmeConnectionQualityIndSend
1242 The SME sends this primitive to all the tasks that have registered to
1243 receive it whenever the value of the current connection quality
1244 parameters change by more than a certain configurable amount.
1245 The wireless manager application may configure the trigger thresholds for
1246 this indication using the field in smeConfig parameter of
1247 CSR_WIFI_SME_SME_CONFIG_SET_REQ.
1248 Connection quality messages can be suppressed by setting both thresholds
1252 queue - Destination Task Queue
1253 interfaceTag - Interface Identifier; unique identifier of an interface
1254 linkQuality - Indicates the quality of the link
1256 *******************************************************************************/
1257 #define CsrWifiSmeConnectionQualityIndCreate(msg__, dst__, src__, interfaceTag__, linkQuality__) \
1258 msg__ = (CsrWifiSmeConnectionQualityInd *) CsrPmemAlloc(sizeof(CsrWifiSmeConnectionQualityInd)); \
1259 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CONNECTION_QUALITY_IND, dst__, src__); \
1260 msg__->interfaceTag = (interfaceTag__); \
1261 msg__->linkQuality = (linkQuality__);
1263 #define CsrWifiSmeConnectionQualityIndSendTo(dst__, src__, interfaceTag__, linkQuality__) \
1265 CsrWifiSmeConnectionQualityInd *msg__; \
1266 CsrWifiSmeConnectionQualityIndCreate(msg__, dst__, src__, interfaceTag__, linkQuality__); \
1267 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1270 #define CsrWifiSmeConnectionQualityIndSend(dst__, interfaceTag__, linkQuality__) \
1271 CsrWifiSmeConnectionQualityIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, linkQuality__)
1273 /*******************************************************************************
1276 CsrWifiSmeConnectionStatsGetReqSend
1279 This primitive gets the value of the ConnectionStats parameter.
1282 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
1283 interfaceTag - Interface Identifier; unique identifier of an interface
1285 *******************************************************************************/
1286 #define CsrWifiSmeConnectionStatsGetReqCreate(msg__, dst__, src__, interfaceTag__) \
1287 msg__ = (CsrWifiSmeConnectionStatsGetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeConnectionStatsGetReq)); \
1288 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CONNECTION_STATS_GET_REQ, dst__, src__); \
1289 msg__->interfaceTag = (interfaceTag__);
1291 #define CsrWifiSmeConnectionStatsGetReqSendTo(dst__, src__, interfaceTag__) \
1293 CsrWifiSmeConnectionStatsGetReq *msg__; \
1294 CsrWifiSmeConnectionStatsGetReqCreate(msg__, dst__, src__, interfaceTag__); \
1295 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
1298 #define CsrWifiSmeConnectionStatsGetReqSend(src__, interfaceTag__) \
1299 CsrWifiSmeConnectionStatsGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__)
1301 /*******************************************************************************
1304 CsrWifiSmeConnectionStatsGetCfmSend
1307 This primitive reports the result of the request.
1310 queue - Destination Task Queue
1311 interfaceTag - Interface Identifier; unique identifier of an interface
1312 status - Reports the result of the request
1313 connectionStats - Statistics for current connection.
1315 *******************************************************************************/
1316 #define CsrWifiSmeConnectionStatsGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, connectionStats__) \
1317 msg__ = (CsrWifiSmeConnectionStatsGetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeConnectionStatsGetCfm)); \
1318 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CONNECTION_STATS_GET_CFM, dst__, src__); \
1319 msg__->interfaceTag = (interfaceTag__); \
1320 msg__->status = (status__); \
1321 msg__->connectionStats = (connectionStats__);
1323 #define CsrWifiSmeConnectionStatsGetCfmSendTo(dst__, src__, interfaceTag__, status__, connectionStats__) \
1325 CsrWifiSmeConnectionStatsGetCfm *msg__; \
1326 CsrWifiSmeConnectionStatsGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, connectionStats__); \
1327 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1330 #define CsrWifiSmeConnectionStatsGetCfmSend(dst__, interfaceTag__, status__, connectionStats__) \
1331 CsrWifiSmeConnectionStatsGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, connectionStats__)
1333 /*******************************************************************************
1336 CsrWifiSmeCoreDumpIndSend
1339 The SME will send this primitive to all the tasks that have registered to
1340 receive Wi-Fi Chip core dump data.
1341 The core dump data may be fragmented and sent using more than one
1343 To indicate that all the data has been sent, the last indication contains
1344 a 'length' of 0 and 'data' of NULL.
1347 queue - Destination Task Queue
1348 dataLength - Number of bytes in the buffer pointed to by 'data'
1349 data - Pointer to the buffer containing 'dataLength' bytes of core
1352 *******************************************************************************/
1353 #define CsrWifiSmeCoreDumpIndCreate(msg__, dst__, src__, dataLength__, data__) \
1354 msg__ = (CsrWifiSmeCoreDumpInd *) CsrPmemAlloc(sizeof(CsrWifiSmeCoreDumpInd)); \
1355 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CORE_DUMP_IND, dst__, src__); \
1356 msg__->dataLength = (dataLength__); \
1357 msg__->data = (data__);
1359 #define CsrWifiSmeCoreDumpIndSendTo(dst__, src__, dataLength__, data__) \
1361 CsrWifiSmeCoreDumpInd *msg__; \
1362 CsrWifiSmeCoreDumpIndCreate(msg__, dst__, src__, dataLength__, data__); \
1363 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1366 #define CsrWifiSmeCoreDumpIndSend(dst__, dataLength__, data__) \
1367 CsrWifiSmeCoreDumpIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, dataLength__, data__)
1369 /*******************************************************************************
1372 CsrWifiSmeDeactivateReqSend
1375 The WMA sends this primitive to deactivate the SME.
1378 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
1380 *******************************************************************************/
1381 #define CsrWifiSmeDeactivateReqCreate(msg__, dst__, src__) \
1382 msg__ = (CsrWifiSmeDeactivateReq *) CsrPmemAlloc(sizeof(CsrWifiSmeDeactivateReq)); \
1383 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_DEACTIVATE_REQ, dst__, src__);
1385 #define CsrWifiSmeDeactivateReqSendTo(dst__, src__) \
1387 CsrWifiSmeDeactivateReq *msg__; \
1388 CsrWifiSmeDeactivateReqCreate(msg__, dst__, src__); \
1389 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
1392 #define CsrWifiSmeDeactivateReqSend(src__) \
1393 CsrWifiSmeDeactivateReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
1395 /*******************************************************************************
1398 CsrWifiSmeDeactivateCfmSend
1401 The SME sends this primitive when the deactivation is complete.
1402 The WMA cannot send any more primitives until it actives the SME again
1403 sending another CSR_WIFI_SME_ACTIVATE_REQ.
1406 queue - Destination Task Queue
1407 status - Reports the result of the request
1409 *******************************************************************************/
1410 #define CsrWifiSmeDeactivateCfmCreate(msg__, dst__, src__, status__) \
1411 msg__ = (CsrWifiSmeDeactivateCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeDeactivateCfm)); \
1412 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_DEACTIVATE_CFM, dst__, src__); \
1413 msg__->status = (status__);
1415 #define CsrWifiSmeDeactivateCfmSendTo(dst__, src__, status__) \
1417 CsrWifiSmeDeactivateCfm *msg__; \
1418 CsrWifiSmeDeactivateCfmCreate(msg__, dst__, src__, status__); \
1419 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1422 #define CsrWifiSmeDeactivateCfmSend(dst__, status__) \
1423 CsrWifiSmeDeactivateCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
1425 /*******************************************************************************
1428 CsrWifiSmeDisconnectReqSend
1431 The wireless manager application may disconnect from the current network
1432 by calling this primitive
1435 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
1436 interfaceTag - Interface Identifier; unique identifier of an interface
1438 *******************************************************************************/
1439 #define CsrWifiSmeDisconnectReqCreate(msg__, dst__, src__, interfaceTag__) \
1440 msg__ = (CsrWifiSmeDisconnectReq *) CsrPmemAlloc(sizeof(CsrWifiSmeDisconnectReq)); \
1441 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_DISCONNECT_REQ, dst__, src__); \
1442 msg__->interfaceTag = (interfaceTag__);
1444 #define CsrWifiSmeDisconnectReqSendTo(dst__, src__, interfaceTag__) \
1446 CsrWifiSmeDisconnectReq *msg__; \
1447 CsrWifiSmeDisconnectReqCreate(msg__, dst__, src__, interfaceTag__); \
1448 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
1451 #define CsrWifiSmeDisconnectReqSend(src__, interfaceTag__) \
1452 CsrWifiSmeDisconnectReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__)
1454 /*******************************************************************************
1457 CsrWifiSmeDisconnectCfmSend
1460 On reception of CSR_WIFI_SME_DISCONNECT_REQ the SME will perform a
1461 disconnect operation, sending a CsrWifiSmeMediaStatusInd with
1462 CSR_WIFI_SME_MEDIA_STATUS_DISCONNECTED and then call this primitive when
1463 disconnection is complete.
1466 queue - Destination Task Queue
1467 interfaceTag - Interface Identifier; unique identifier of an interface
1468 status - Reports the result of the request
1470 *******************************************************************************/
1471 #define CsrWifiSmeDisconnectCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
1472 msg__ = (CsrWifiSmeDisconnectCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeDisconnectCfm)); \
1473 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_DISCONNECT_CFM, dst__, src__); \
1474 msg__->interfaceTag = (interfaceTag__); \
1475 msg__->status = (status__);
1477 #define CsrWifiSmeDisconnectCfmSendTo(dst__, src__, interfaceTag__, status__) \
1479 CsrWifiSmeDisconnectCfm *msg__; \
1480 CsrWifiSmeDisconnectCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
1481 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1484 #define CsrWifiSmeDisconnectCfmSend(dst__, interfaceTag__, status__) \
1485 CsrWifiSmeDisconnectCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
1487 /*******************************************************************************
1490 CsrWifiSmeErrorIndSend
1493 Important error message indicating a error of some importance
1496 queue - Destination Task Queue
1497 errorMessage - Contains the error message.
1499 *******************************************************************************/
1500 #define CsrWifiSmeErrorIndCreate(msg__, dst__, src__, errorMessage__) \
1501 msg__ = (CsrWifiSmeErrorInd *) CsrPmemAlloc(sizeof(CsrWifiSmeErrorInd)); \
1502 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ERROR_IND, dst__, src__); \
1503 msg__->errorMessage = (errorMessage__);
1505 #define CsrWifiSmeErrorIndSendTo(dst__, src__, errorMessage__) \
1507 CsrWifiSmeErrorInd *msg__; \
1508 CsrWifiSmeErrorIndCreate(msg__, dst__, src__, errorMessage__); \
1509 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1512 #define CsrWifiSmeErrorIndSend(dst__, errorMessage__) \
1513 CsrWifiSmeErrorIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, errorMessage__)
1515 /*******************************************************************************
1518 CsrWifiSmeEventMaskSetReqSend
1521 The wireless manager application may register with the SME to receive
1522 notification of interesting events. Indications will be sent only if the
1523 wireless manager explicitly registers to be notified of that event.
1524 indMask is a bit mask of values defined in CsrWifiSmeIndicationsMask.
1527 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
1528 indMask - Set mask with values from CsrWifiSmeIndications
1530 *******************************************************************************/
1531 #define CsrWifiSmeEventMaskSetReqCreate(msg__, dst__, src__, indMask__) \
1532 msg__ = (CsrWifiSmeEventMaskSetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeEventMaskSetReq)); \
1533 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_EVENT_MASK_SET_REQ, dst__, src__); \
1534 msg__->indMask = (indMask__);
1536 #define CsrWifiSmeEventMaskSetReqSendTo(dst__, src__, indMask__) \
1538 CsrWifiSmeEventMaskSetReq *msg__; \
1539 CsrWifiSmeEventMaskSetReqCreate(msg__, dst__, src__, indMask__); \
1540 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
1543 #define CsrWifiSmeEventMaskSetReqSend(src__, indMask__) \
1544 CsrWifiSmeEventMaskSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, indMask__)
1546 /*******************************************************************************
1549 CsrWifiSmeEventMaskSetCfmSend
1552 The SME calls the primitive to report the result of the request
1556 queue - Destination Task Queue
1557 status - Reports the result of the request
1559 *******************************************************************************/
1560 #define CsrWifiSmeEventMaskSetCfmCreate(msg__, dst__, src__, status__) \
1561 msg__ = (CsrWifiSmeEventMaskSetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeEventMaskSetCfm)); \
1562 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_EVENT_MASK_SET_CFM, dst__, src__); \
1563 msg__->status = (status__);
1565 #define CsrWifiSmeEventMaskSetCfmSendTo(dst__, src__, status__) \
1567 CsrWifiSmeEventMaskSetCfm *msg__; \
1568 CsrWifiSmeEventMaskSetCfmCreate(msg__, dst__, src__, status__); \
1569 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1572 #define CsrWifiSmeEventMaskSetCfmSend(dst__, status__) \
1573 CsrWifiSmeEventMaskSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
1575 /*******************************************************************************
1578 CsrWifiSmeHostConfigGetReqSend
1581 This primitive gets the value of the hostConfig parameter.
1584 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
1585 interfaceTag - Interface Identifier; unique identifier of an interface
1587 *******************************************************************************/
1588 #define CsrWifiSmeHostConfigGetReqCreate(msg__, dst__, src__, interfaceTag__) \
1589 msg__ = (CsrWifiSmeHostConfigGetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeHostConfigGetReq)); \
1590 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_HOST_CONFIG_GET_REQ, dst__, src__); \
1591 msg__->interfaceTag = (interfaceTag__);
1593 #define CsrWifiSmeHostConfigGetReqSendTo(dst__, src__, interfaceTag__) \
1595 CsrWifiSmeHostConfigGetReq *msg__; \
1596 CsrWifiSmeHostConfigGetReqCreate(msg__, dst__, src__, interfaceTag__); \
1597 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
1600 #define CsrWifiSmeHostConfigGetReqSend(src__, interfaceTag__) \
1601 CsrWifiSmeHostConfigGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__)
1603 /*******************************************************************************
1606 CsrWifiSmeHostConfigGetCfmSend
1609 This primitive reports the result of the request.
1612 queue - Destination Task Queue
1613 interfaceTag - Interface Identifier; unique identifier of an interface
1614 status - Reports the result of the request
1615 hostConfig - Current host power state.
1617 *******************************************************************************/
1618 #define CsrWifiSmeHostConfigGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, hostConfig__) \
1619 msg__ = (CsrWifiSmeHostConfigGetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeHostConfigGetCfm)); \
1620 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_HOST_CONFIG_GET_CFM, dst__, src__); \
1621 msg__->interfaceTag = (interfaceTag__); \
1622 msg__->status = (status__); \
1623 msg__->hostConfig = (hostConfig__);
1625 #define CsrWifiSmeHostConfigGetCfmSendTo(dst__, src__, interfaceTag__, status__, hostConfig__) \
1627 CsrWifiSmeHostConfigGetCfm *msg__; \
1628 CsrWifiSmeHostConfigGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, hostConfig__); \
1629 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1632 #define CsrWifiSmeHostConfigGetCfmSend(dst__, interfaceTag__, status__, hostConfig__) \
1633 CsrWifiSmeHostConfigGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, hostConfig__)
1635 /*******************************************************************************
1638 CsrWifiSmeHostConfigSetReqSend
1641 This primitive sets the value of the hostConfig parameter.
1644 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
1645 interfaceTag - Interface Identifier; unique identifier of an interface
1646 hostConfig - Communicates a change of host power state (for example, on
1647 mains power, on battery power etc) and of the periodicity of
1650 *******************************************************************************/
1651 #define CsrWifiSmeHostConfigSetReqCreate(msg__, dst__, src__, interfaceTag__, hostConfig__) \
1652 msg__ = (CsrWifiSmeHostConfigSetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeHostConfigSetReq)); \
1653 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_HOST_CONFIG_SET_REQ, dst__, src__); \
1654 msg__->interfaceTag = (interfaceTag__); \
1655 msg__->hostConfig = (hostConfig__);
1657 #define CsrWifiSmeHostConfigSetReqSendTo(dst__, src__, interfaceTag__, hostConfig__) \
1659 CsrWifiSmeHostConfigSetReq *msg__; \
1660 CsrWifiSmeHostConfigSetReqCreate(msg__, dst__, src__, interfaceTag__, hostConfig__); \
1661 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
1664 #define CsrWifiSmeHostConfigSetReqSend(src__, interfaceTag__, hostConfig__) \
1665 CsrWifiSmeHostConfigSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__, hostConfig__)
1667 /*******************************************************************************
1670 CsrWifiSmeHostConfigSetCfmSend
1673 This primitive reports the result of the request.
1676 queue - Destination Task Queue
1677 interfaceTag - Interface Identifier; unique identifier of an interface
1678 status - Reports the result of the request
1680 *******************************************************************************/
1681 #define CsrWifiSmeHostConfigSetCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
1682 msg__ = (CsrWifiSmeHostConfigSetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeHostConfigSetCfm)); \
1683 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_HOST_CONFIG_SET_CFM, dst__, src__); \
1684 msg__->interfaceTag = (interfaceTag__); \
1685 msg__->status = (status__);
1687 #define CsrWifiSmeHostConfigSetCfmSendTo(dst__, src__, interfaceTag__, status__) \
1689 CsrWifiSmeHostConfigSetCfm *msg__; \
1690 CsrWifiSmeHostConfigSetCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
1691 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1694 #define CsrWifiSmeHostConfigSetCfmSend(dst__, interfaceTag__, status__) \
1695 CsrWifiSmeHostConfigSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
1697 /*******************************************************************************
1700 CsrWifiSmeIbssStationIndSend
1703 The SME will send this primitive to indicate that a station has joined or
1704 left the ad-hoc network.
1707 queue - Destination Task Queue
1708 address - MAC address of the station that has joined or left
1709 isconnected - TRUE if the station joined, FALSE if the station left
1711 *******************************************************************************/
1712 #define CsrWifiSmeIbssStationIndCreate(msg__, dst__, src__, address__, isconnected__) \
1713 msg__ = (CsrWifiSmeIbssStationInd *) CsrPmemAlloc(sizeof(CsrWifiSmeIbssStationInd)); \
1714 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_IBSS_STATION_IND, dst__, src__); \
1715 msg__->address = (address__); \
1716 msg__->isconnected = (isconnected__);
1718 #define CsrWifiSmeIbssStationIndSendTo(dst__, src__, address__, isconnected__) \
1720 CsrWifiSmeIbssStationInd *msg__; \
1721 CsrWifiSmeIbssStationIndCreate(msg__, dst__, src__, address__, isconnected__); \
1722 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1725 #define CsrWifiSmeIbssStationIndSend(dst__, address__, isconnected__) \
1726 CsrWifiSmeIbssStationIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, address__, isconnected__)
1728 /*******************************************************************************
1731 CsrWifiSmeInfoIndSend
1734 Message indicating a some info about current activity. Mostly of interest
1735 in testing but may be useful in the field.
1738 queue - Destination Task Queue
1739 infoMessage - Contains the message.
1741 *******************************************************************************/
1742 #define CsrWifiSmeInfoIndCreate(msg__, dst__, src__, infoMessage__) \
1743 msg__ = (CsrWifiSmeInfoInd *) CsrPmemAlloc(sizeof(CsrWifiSmeInfoInd)); \
1744 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_INFO_IND, dst__, src__); \
1745 msg__->infoMessage = (infoMessage__);
1747 #define CsrWifiSmeInfoIndSendTo(dst__, src__, infoMessage__) \
1749 CsrWifiSmeInfoInd *msg__; \
1750 CsrWifiSmeInfoIndCreate(msg__, dst__, src__, infoMessage__); \
1751 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1754 #define CsrWifiSmeInfoIndSend(dst__, infoMessage__) \
1755 CsrWifiSmeInfoIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, infoMessage__)
1757 /*******************************************************************************
1760 CsrWifiSmeInterfaceCapabilityGetReqSend
1763 The Wireless Manager calls this primitive to ask the SME for the
1764 capabilities of the supported interfaces
1767 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
1769 *******************************************************************************/
1770 #define CsrWifiSmeInterfaceCapabilityGetReqCreate(msg__, dst__, src__) \
1771 msg__ = (CsrWifiSmeInterfaceCapabilityGetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeInterfaceCapabilityGetReq)); \
1772 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_INTERFACE_CAPABILITY_GET_REQ, dst__, src__);
1774 #define CsrWifiSmeInterfaceCapabilityGetReqSendTo(dst__, src__) \
1776 CsrWifiSmeInterfaceCapabilityGetReq *msg__; \
1777 CsrWifiSmeInterfaceCapabilityGetReqCreate(msg__, dst__, src__); \
1778 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
1781 #define CsrWifiSmeInterfaceCapabilityGetReqSend(src__) \
1782 CsrWifiSmeInterfaceCapabilityGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
1784 /*******************************************************************************
1787 CsrWifiSmeInterfaceCapabilityGetCfmSend
1790 This primitive reports the result of the request.
1793 queue - Destination Task Queue
1794 status - Result of the request
1795 numInterfaces - Number of the interfaces supported
1796 capBitmap - Points to the list of capabilities bitmaps provided for each
1798 The bits represent the following capabilities:
1799 -bits 7 to 4-Reserved
1805 *******************************************************************************/
1806 #define CsrWifiSmeInterfaceCapabilityGetCfmCreate(msg__, dst__, src__, status__, numInterfaces__, capBitmap__) \
1807 msg__ = (CsrWifiSmeInterfaceCapabilityGetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeInterfaceCapabilityGetCfm)); \
1808 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_INTERFACE_CAPABILITY_GET_CFM, dst__, src__); \
1809 msg__->status = (status__); \
1810 msg__->numInterfaces = (numInterfaces__); \
1811 memcpy(msg__->capBitmap, (capBitmap__), sizeof(u8) * 2);
1813 #define CsrWifiSmeInterfaceCapabilityGetCfmSendTo(dst__, src__, status__, numInterfaces__, capBitmap__) \
1815 CsrWifiSmeInterfaceCapabilityGetCfm *msg__; \
1816 CsrWifiSmeInterfaceCapabilityGetCfmCreate(msg__, dst__, src__, status__, numInterfaces__, capBitmap__); \
1817 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1820 #define CsrWifiSmeInterfaceCapabilityGetCfmSend(dst__, status__, numInterfaces__, capBitmap__) \
1821 CsrWifiSmeInterfaceCapabilityGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, numInterfaces__, capBitmap__)
1823 /*******************************************************************************
1826 CsrWifiSmeKeyReqSend
1829 The wireless manager application calls this primitive to add or remove
1830 keys that the chip should use for encryption of data.
1831 The interface allows the wireless manager application to add and remove
1832 keys according to the specified action.
1835 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
1836 interfaceTag - Interface Identifier; unique identifier of an interface
1837 action - The value of the CsrWifiSmeListAction parameter instructs the
1838 driver to modify or provide the list of keys.
1839 CSR_WIFI_SME_LIST_ACTION_GET is not supported here.
1840 key - Key to be added or removed
1842 *******************************************************************************/
1843 #define CsrWifiSmeKeyReqCreate(msg__, dst__, src__, interfaceTag__, action__, key__) \
1844 msg__ = (CsrWifiSmeKeyReq *) CsrPmemAlloc(sizeof(CsrWifiSmeKeyReq)); \
1845 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_KEY_REQ, dst__, src__); \
1846 msg__->interfaceTag = (interfaceTag__); \
1847 msg__->action = (action__); \
1848 msg__->key = (key__);
1850 #define CsrWifiSmeKeyReqSendTo(dst__, src__, interfaceTag__, action__, key__) \
1852 CsrWifiSmeKeyReq *msg__; \
1853 CsrWifiSmeKeyReqCreate(msg__, dst__, src__, interfaceTag__, action__, key__); \
1854 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
1857 #define CsrWifiSmeKeyReqSend(src__, interfaceTag__, action__, key__) \
1858 CsrWifiSmeKeyReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__, action__, key__)
1860 /*******************************************************************************
1863 CsrWifiSmeKeyCfmSend
1866 The SME calls the primitive to report the result of the request
1870 queue - Destination Task Queue
1871 interfaceTag - Interface Identifier; unique identifier of an interface
1872 status - Reports the result of the request
1873 action - Action in the request
1874 keyType - Type of the key added/deleted
1875 peerMacAddress - Peer MAC Address of the key added/deleted
1877 *******************************************************************************/
1878 #define CsrWifiSmeKeyCfmCreate(msg__, dst__, src__, interfaceTag__, status__, action__, keyType__, peerMacAddress__) \
1879 msg__ = (CsrWifiSmeKeyCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeKeyCfm)); \
1880 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_KEY_CFM, dst__, src__); \
1881 msg__->interfaceTag = (interfaceTag__); \
1882 msg__->status = (status__); \
1883 msg__->action = (action__); \
1884 msg__->keyType = (keyType__); \
1885 msg__->peerMacAddress = (peerMacAddress__);
1887 #define CsrWifiSmeKeyCfmSendTo(dst__, src__, interfaceTag__, status__, action__, keyType__, peerMacAddress__) \
1889 CsrWifiSmeKeyCfm *msg__; \
1890 CsrWifiSmeKeyCfmCreate(msg__, dst__, src__, interfaceTag__, status__, action__, keyType__, peerMacAddress__); \
1891 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1894 #define CsrWifiSmeKeyCfmSend(dst__, interfaceTag__, status__, action__, keyType__, peerMacAddress__) \
1895 CsrWifiSmeKeyCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, action__, keyType__, peerMacAddress__)
1897 /*******************************************************************************
1900 CsrWifiSmeLinkQualityGetReqSend
1903 This primitive gets the value of the LinkQuality parameter.
1906 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
1907 interfaceTag - Interface Identifier; unique identifier of an interface
1909 *******************************************************************************/
1910 #define CsrWifiSmeLinkQualityGetReqCreate(msg__, dst__, src__, interfaceTag__) \
1911 msg__ = (CsrWifiSmeLinkQualityGetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeLinkQualityGetReq)); \
1912 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_LINK_QUALITY_GET_REQ, dst__, src__); \
1913 msg__->interfaceTag = (interfaceTag__);
1915 #define CsrWifiSmeLinkQualityGetReqSendTo(dst__, src__, interfaceTag__) \
1917 CsrWifiSmeLinkQualityGetReq *msg__; \
1918 CsrWifiSmeLinkQualityGetReqCreate(msg__, dst__, src__, interfaceTag__); \
1919 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
1922 #define CsrWifiSmeLinkQualityGetReqSend(src__, interfaceTag__) \
1923 CsrWifiSmeLinkQualityGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__)
1925 /*******************************************************************************
1928 CsrWifiSmeLinkQualityGetCfmSend
1931 This primitive reports the result of the request.
1934 queue - Destination Task Queue
1935 interfaceTag - Interface Identifier; unique identifier of an interface
1936 status - Reports the result of the request
1937 linkQuality - Indicates the quality of the link
1939 *******************************************************************************/
1940 #define CsrWifiSmeLinkQualityGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, linkQuality__) \
1941 msg__ = (CsrWifiSmeLinkQualityGetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeLinkQualityGetCfm)); \
1942 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_LINK_QUALITY_GET_CFM, dst__, src__); \
1943 msg__->interfaceTag = (interfaceTag__); \
1944 msg__->status = (status__); \
1945 msg__->linkQuality = (linkQuality__);
1947 #define CsrWifiSmeLinkQualityGetCfmSendTo(dst__, src__, interfaceTag__, status__, linkQuality__) \
1949 CsrWifiSmeLinkQualityGetCfm *msg__; \
1950 CsrWifiSmeLinkQualityGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, linkQuality__); \
1951 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1954 #define CsrWifiSmeLinkQualityGetCfmSend(dst__, interfaceTag__, status__, linkQuality__) \
1955 CsrWifiSmeLinkQualityGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, linkQuality__)
1957 /*******************************************************************************
1960 CsrWifiSmeMediaStatusIndSend
1963 The SME sends this primitive to all the tasks that have registered to
1964 receive it when a network connection is established, lost or has moved to
1968 queue - Destination Task Queue
1969 interfaceTag - Interface Identifier; unique identifier of an interface
1970 mediaStatus - Indicates the media status
1971 connectionInfo - This parameter is relevant only if the mediaStatus is
1972 CSR_WIFI_SME_MEDIA_STATUS_CONNECTED:
1973 it points to the connection information for the new network
1974 disassocReason - This parameter is relevant only if the mediaStatus is
1975 CSR_WIFI_SME_MEDIA_STATUS_DISCONNECTED:
1976 if a disassociation has occurred it gives the reason of the
1978 deauthReason - This parameter is relevant only if the mediaStatus is
1979 CSR_WIFI_SME_MEDIA_STATUS_DISCONNECTED:
1980 if a deauthentication has occurred it gives the reason of
1981 the deauthentication
1983 *******************************************************************************/
1984 #define CsrWifiSmeMediaStatusIndCreate(msg__, dst__, src__, interfaceTag__, mediaStatus__, connectionInfo__, disassocReason__, deauthReason__) \
1985 msg__ = (CsrWifiSmeMediaStatusInd *) CsrPmemAlloc(sizeof(CsrWifiSmeMediaStatusInd)); \
1986 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_MEDIA_STATUS_IND, dst__, src__); \
1987 msg__->interfaceTag = (interfaceTag__); \
1988 msg__->mediaStatus = (mediaStatus__); \
1989 msg__->connectionInfo = (connectionInfo__); \
1990 msg__->disassocReason = (disassocReason__); \
1991 msg__->deauthReason = (deauthReason__);
1993 #define CsrWifiSmeMediaStatusIndSendTo(dst__, src__, interfaceTag__, mediaStatus__, connectionInfo__, disassocReason__, deauthReason__) \
1995 CsrWifiSmeMediaStatusInd *msg__; \
1996 CsrWifiSmeMediaStatusIndCreate(msg__, dst__, src__, interfaceTag__, mediaStatus__, connectionInfo__, disassocReason__, deauthReason__); \
1997 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2000 #define CsrWifiSmeMediaStatusIndSend(dst__, interfaceTag__, mediaStatus__, connectionInfo__, disassocReason__, deauthReason__) \
2001 CsrWifiSmeMediaStatusIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, mediaStatus__, connectionInfo__, disassocReason__, deauthReason__)
2003 /*******************************************************************************
2006 CsrWifiSmeMibConfigGetReqSend
2009 This primitive gets the value of the MibConfig parameter.
2012 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
2014 *******************************************************************************/
2015 #define CsrWifiSmeMibConfigGetReqCreate(msg__, dst__, src__) \
2016 msg__ = (CsrWifiSmeMibConfigGetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeMibConfigGetReq)); \
2017 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_MIB_CONFIG_GET_REQ, dst__, src__);
2019 #define CsrWifiSmeMibConfigGetReqSendTo(dst__, src__) \
2021 CsrWifiSmeMibConfigGetReq *msg__; \
2022 CsrWifiSmeMibConfigGetReqCreate(msg__, dst__, src__); \
2023 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
2026 #define CsrWifiSmeMibConfigGetReqSend(src__) \
2027 CsrWifiSmeMibConfigGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
2029 /*******************************************************************************
2032 CsrWifiSmeMibConfigGetCfmSend
2035 This primitive reports the result of the request.
2038 queue - Destination Task Queue
2039 status - Reports the result of the request
2040 mibConfig - Reports various IEEE 802.11 attributes as currently configured
2042 *******************************************************************************/
2043 #define CsrWifiSmeMibConfigGetCfmCreate(msg__, dst__, src__, status__, mibConfig__) \
2044 msg__ = (CsrWifiSmeMibConfigGetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeMibConfigGetCfm)); \
2045 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_MIB_CONFIG_GET_CFM, dst__, src__); \
2046 msg__->status = (status__); \
2047 msg__->mibConfig = (mibConfig__);
2049 #define CsrWifiSmeMibConfigGetCfmSendTo(dst__, src__, status__, mibConfig__) \
2051 CsrWifiSmeMibConfigGetCfm *msg__; \
2052 CsrWifiSmeMibConfigGetCfmCreate(msg__, dst__, src__, status__, mibConfig__); \
2053 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2056 #define CsrWifiSmeMibConfigGetCfmSend(dst__, status__, mibConfig__) \
2057 CsrWifiSmeMibConfigGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, mibConfig__)
2059 /*******************************************************************************
2062 CsrWifiSmeMibConfigSetReqSend
2065 This primitive sets the value of the MibConfig parameter.
2068 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
2069 mibConfig - Conveys the desired value of various IEEE 802.11 attributes as
2070 currently configured
2072 *******************************************************************************/
2073 #define CsrWifiSmeMibConfigSetReqCreate(msg__, dst__, src__, mibConfig__) \
2074 msg__ = (CsrWifiSmeMibConfigSetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeMibConfigSetReq)); \
2075 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_MIB_CONFIG_SET_REQ, dst__, src__); \
2076 msg__->mibConfig = (mibConfig__);
2078 #define CsrWifiSmeMibConfigSetReqSendTo(dst__, src__, mibConfig__) \
2080 CsrWifiSmeMibConfigSetReq *msg__; \
2081 CsrWifiSmeMibConfigSetReqCreate(msg__, dst__, src__, mibConfig__); \
2082 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
2085 #define CsrWifiSmeMibConfigSetReqSend(src__, mibConfig__) \
2086 CsrWifiSmeMibConfigSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, mibConfig__)
2088 /*******************************************************************************
2091 CsrWifiSmeMibConfigSetCfmSend
2094 This primitive reports the result of the request.
2097 queue - Destination Task Queue
2098 status - Reports the result of the request
2100 *******************************************************************************/
2101 #define CsrWifiSmeMibConfigSetCfmCreate(msg__, dst__, src__, status__) \
2102 msg__ = (CsrWifiSmeMibConfigSetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeMibConfigSetCfm)); \
2103 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_MIB_CONFIG_SET_CFM, dst__, src__); \
2104 msg__->status = (status__);
2106 #define CsrWifiSmeMibConfigSetCfmSendTo(dst__, src__, status__) \
2108 CsrWifiSmeMibConfigSetCfm *msg__; \
2109 CsrWifiSmeMibConfigSetCfmCreate(msg__, dst__, src__, status__); \
2110 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2113 #define CsrWifiSmeMibConfigSetCfmSend(dst__, status__) \
2114 CsrWifiSmeMibConfigSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
2116 /*******************************************************************************
2119 CsrWifiSmeMibGetCfmSend
2122 The SME calls this primitive to return the requested MIB variable values.
2125 queue - Destination Task Queue
2126 status - Reports the result of the request
2127 mibAttributeLength - Length of mibAttribute
2128 mibAttribute - Points to the VarBind or VarBindList containing the
2129 names and values of the MIB variables requested
2131 *******************************************************************************/
2132 #define CsrWifiSmeMibGetCfmCreate(msg__, dst__, src__, status__, mibAttributeLength__, mibAttribute__) \
2133 msg__ = (CsrWifiSmeMibGetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeMibGetCfm)); \
2134 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_MIB_GET_CFM, dst__, src__); \
2135 msg__->status = (status__); \
2136 msg__->mibAttributeLength = (mibAttributeLength__); \
2137 msg__->mibAttribute = (mibAttribute__);
2139 #define CsrWifiSmeMibGetCfmSendTo(dst__, src__, status__, mibAttributeLength__, mibAttribute__) \
2141 CsrWifiSmeMibGetCfm *msg__; \
2142 CsrWifiSmeMibGetCfmCreate(msg__, dst__, src__, status__, mibAttributeLength__, mibAttribute__); \
2143 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2146 #define CsrWifiSmeMibGetCfmSend(dst__, status__, mibAttributeLength__, mibAttribute__) \
2147 CsrWifiSmeMibGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, mibAttributeLength__, mibAttribute__)
2149 /*******************************************************************************
2152 CsrWifiSmeMibGetNextReqSend
2155 To read a sequence of MIB parameters, for example a table, call this
2156 primitive to find the name of the next MIB variable
2159 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
2160 mibAttributeLength - Length of mibAttribute
2161 mibAttribute - Points to a VarBind or VarBindList containing the
2162 name(s) of the MIB variable(s) to search from.
2164 *******************************************************************************/
2165 #define CsrWifiSmeMibGetNextReqCreate(msg__, dst__, src__, mibAttributeLength__, mibAttribute__) \
2166 msg__ = (CsrWifiSmeMibGetNextReq *) CsrPmemAlloc(sizeof(CsrWifiSmeMibGetNextReq)); \
2167 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_MIB_GET_NEXT_REQ, dst__, src__); \
2168 msg__->mibAttributeLength = (mibAttributeLength__); \
2169 msg__->mibAttribute = (mibAttribute__);
2171 #define CsrWifiSmeMibGetNextReqSendTo(dst__, src__, mibAttributeLength__, mibAttribute__) \
2173 CsrWifiSmeMibGetNextReq *msg__; \
2174 CsrWifiSmeMibGetNextReqCreate(msg__, dst__, src__, mibAttributeLength__, mibAttribute__); \
2175 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
2178 #define CsrWifiSmeMibGetNextReqSend(src__, mibAttributeLength__, mibAttribute__) \
2179 CsrWifiSmeMibGetNextReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, mibAttributeLength__, mibAttribute__)
2181 /*******************************************************************************
2184 CsrWifiSmeMibGetNextCfmSend
2187 The SME calls this primitive to return the requested MIB name(s).
2188 The wireless manager application can then read the value of the MIB
2189 variable using CSR_WIFI_SME_MIB_GET_REQ, using the names provided.
2192 queue - Destination Task Queue
2193 status - Reports the result of the request
2194 mibAttributeLength - Length of mibAttribute
2195 mibAttribute - Points to a VarBind or VarBindList containing the
2196 name(s) of the MIB variable(s) lexicographically
2197 following the name(s) given in the request
2199 *******************************************************************************/
2200 #define CsrWifiSmeMibGetNextCfmCreate(msg__, dst__, src__, status__, mibAttributeLength__, mibAttribute__) \
2201 msg__ = (CsrWifiSmeMibGetNextCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeMibGetNextCfm)); \
2202 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_MIB_GET_NEXT_CFM, dst__, src__); \
2203 msg__->status = (status__); \
2204 msg__->mibAttributeLength = (mibAttributeLength__); \
2205 msg__->mibAttribute = (mibAttribute__);
2207 #define CsrWifiSmeMibGetNextCfmSendTo(dst__, src__, status__, mibAttributeLength__, mibAttribute__) \
2209 CsrWifiSmeMibGetNextCfm *msg__; \
2210 CsrWifiSmeMibGetNextCfmCreate(msg__, dst__, src__, status__, mibAttributeLength__, mibAttribute__); \
2211 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2214 #define CsrWifiSmeMibGetNextCfmSend(dst__, status__, mibAttributeLength__, mibAttribute__) \
2215 CsrWifiSmeMibGetNextCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, mibAttributeLength__, mibAttribute__)
2217 /*******************************************************************************
2220 CsrWifiSmeMibGetReqSend
2223 The wireless manager application calls this primitive to retrieve one or
2227 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
2228 mibAttributeLength - Length of mibAttribute
2229 mibAttribute - Points to the VarBind or VarBindList containing the
2230 names of the MIB variables to be retrieved
2232 *******************************************************************************/
2233 #define CsrWifiSmeMibGetReqCreate(msg__, dst__, src__, mibAttributeLength__, mibAttribute__) \
2234 msg__ = (CsrWifiSmeMibGetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeMibGetReq)); \
2235 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_MIB_GET_REQ, dst__, src__); \
2236 msg__->mibAttributeLength = (mibAttributeLength__); \
2237 msg__->mibAttribute = (mibAttribute__);
2239 #define CsrWifiSmeMibGetReqSendTo(dst__, src__, mibAttributeLength__, mibAttribute__) \
2241 CsrWifiSmeMibGetReq *msg__; \
2242 CsrWifiSmeMibGetReqCreate(msg__, dst__, src__, mibAttributeLength__, mibAttribute__); \
2243 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
2246 #define CsrWifiSmeMibGetReqSend(src__, mibAttributeLength__, mibAttribute__) \
2247 CsrWifiSmeMibGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, mibAttributeLength__, mibAttribute__)
2249 /*******************************************************************************
2252 CsrWifiSmeMibSetReqSend
2255 The SME provides raw access to the MIB on the chip, which may be used by
2256 some configuration or diagnostic utilities, but is not normally needed by
2257 the wireless manager application.
2258 The MIB access functions use BER encoded names (OID) of the MIB
2259 parameters and BER encoded values, as described in the chip Host
2260 Interface Protocol Specification.
2261 The MIB parameters are described in 'Wi-Fi 5.0.0 Management Information
2262 Base Reference Guide'.
2263 The wireless manager application calls this primitive to set one or more
2267 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
2268 mibAttributeLength - Length of mibAttribute
2269 mibAttribute - Points to the VarBind or VarBindList containing the
2270 names and values of the MIB variables to set
2272 *******************************************************************************/
2273 #define CsrWifiSmeMibSetReqCreate(msg__, dst__, src__, mibAttributeLength__, mibAttribute__) \
2274 msg__ = (CsrWifiSmeMibSetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeMibSetReq)); \
2275 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_MIB_SET_REQ, dst__, src__); \
2276 msg__->mibAttributeLength = (mibAttributeLength__); \
2277 msg__->mibAttribute = (mibAttribute__);
2279 #define CsrWifiSmeMibSetReqSendTo(dst__, src__, mibAttributeLength__, mibAttribute__) \
2281 CsrWifiSmeMibSetReq *msg__; \
2282 CsrWifiSmeMibSetReqCreate(msg__, dst__, src__, mibAttributeLength__, mibAttribute__); \
2283 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
2286 #define CsrWifiSmeMibSetReqSend(src__, mibAttributeLength__, mibAttribute__) \
2287 CsrWifiSmeMibSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, mibAttributeLength__, mibAttribute__)
2289 /*******************************************************************************
2292 CsrWifiSmeMibSetCfmSend
2295 The SME calls the primitive to report the result of the set primitive.
2298 queue - Destination Task Queue
2299 status - Reports the result of the request
2301 *******************************************************************************/
2302 #define CsrWifiSmeMibSetCfmCreate(msg__, dst__, src__, status__) \
2303 msg__ = (CsrWifiSmeMibSetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeMibSetCfm)); \
2304 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_MIB_SET_CFM, dst__, src__); \
2305 msg__->status = (status__);
2307 #define CsrWifiSmeMibSetCfmSendTo(dst__, src__, status__) \
2309 CsrWifiSmeMibSetCfm *msg__; \
2310 CsrWifiSmeMibSetCfmCreate(msg__, dst__, src__, status__); \
2311 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2314 #define CsrWifiSmeMibSetCfmSend(dst__, status__) \
2315 CsrWifiSmeMibSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
2317 /*******************************************************************************
2320 CsrWifiSmeMicFailureIndSend
2323 The SME sends this primitive to all the tasks that have registered to
2324 receive it whenever the chip firmware reports a MIC failure.
2327 queue - Destination Task Queue
2328 interfaceTag - Interface Identifier; unique identifier of an interface
2329 secondFailure - TRUE if this indication is for a second failure in 60
2331 count - The number of MIC failure events since the connection was
2333 address - MAC address of the transmitter that caused the MIC failure
2334 keyType - Type of key for which the failure occurred
2336 *******************************************************************************/
2337 #define CsrWifiSmeMicFailureIndCreate(msg__, dst__, src__, interfaceTag__, secondFailure__, count__, address__, keyType__) \
2338 msg__ = (CsrWifiSmeMicFailureInd *) CsrPmemAlloc(sizeof(CsrWifiSmeMicFailureInd)); \
2339 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_MIC_FAILURE_IND, dst__, src__); \
2340 msg__->interfaceTag = (interfaceTag__); \
2341 msg__->secondFailure = (secondFailure__); \
2342 msg__->count = (count__); \
2343 msg__->address = (address__); \
2344 msg__->keyType = (keyType__);
2346 #define CsrWifiSmeMicFailureIndSendTo(dst__, src__, interfaceTag__, secondFailure__, count__, address__, keyType__) \
2348 CsrWifiSmeMicFailureInd *msg__; \
2349 CsrWifiSmeMicFailureIndCreate(msg__, dst__, src__, interfaceTag__, secondFailure__, count__, address__, keyType__); \
2350 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2353 #define CsrWifiSmeMicFailureIndSend(dst__, interfaceTag__, secondFailure__, count__, address__, keyType__) \
2354 CsrWifiSmeMicFailureIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, secondFailure__, count__, address__, keyType__)
2356 /*******************************************************************************
2359 CsrWifiSmeMulticastAddressReqSend
2362 The wireless manager application calls this primitive to specify the
2363 multicast addresses which the chip should recognise. The interface allows
2364 the wireless manager application to query, add, remove and flush the
2365 multicast addresses for the network interface according to the specified
2369 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
2370 interfaceTag - Interface Identifier; unique identifier of an interface
2371 action - The value of the CsrWifiSmeListAction parameter
2372 instructs the driver to modify or provide the list of
2374 setAddressesCount - Number of MAC addresses sent with the primitive
2375 setAddresses - Pointer to the list of MAC Addresses sent with the
2376 primitive, set to NULL if none is sent.
2378 *******************************************************************************/
2379 #define CsrWifiSmeMulticastAddressReqCreate(msg__, dst__, src__, interfaceTag__, action__, setAddressesCount__, setAddresses__) \
2380 msg__ = (CsrWifiSmeMulticastAddressReq *) CsrPmemAlloc(sizeof(CsrWifiSmeMulticastAddressReq)); \
2381 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_MULTICAST_ADDRESS_REQ, dst__, src__); \
2382 msg__->interfaceTag = (interfaceTag__); \
2383 msg__->action = (action__); \
2384 msg__->setAddressesCount = (setAddressesCount__); \
2385 msg__->setAddresses = (setAddresses__);
2387 #define CsrWifiSmeMulticastAddressReqSendTo(dst__, src__, interfaceTag__, action__, setAddressesCount__, setAddresses__) \
2389 CsrWifiSmeMulticastAddressReq *msg__; \
2390 CsrWifiSmeMulticastAddressReqCreate(msg__, dst__, src__, interfaceTag__, action__, setAddressesCount__, setAddresses__); \
2391 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
2394 #define CsrWifiSmeMulticastAddressReqSend(src__, interfaceTag__, action__, setAddressesCount__, setAddresses__) \
2395 CsrWifiSmeMulticastAddressReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__, action__, setAddressesCount__, setAddresses__)
2397 /*******************************************************************************
2400 CsrWifiSmeMulticastAddressCfmSend
2403 The SME will call this primitive when the operation is complete. For a
2404 GET action, this primitive reports the current list of MAC addresses.
2407 queue - Destination Task Queue
2408 interfaceTag - Interface Identifier; unique identifier of an interface
2409 status - Reports the result of the request
2410 action - Action in the request
2411 getAddressesCount - This parameter is only relevant if action is
2412 CSR_WIFI_SME_LIST_ACTION_GET:
2413 number of MAC addresses sent with the primitive
2414 getAddresses - Pointer to the list of MAC Addresses sent with the
2415 primitive, set to NULL if none is sent.
2417 *******************************************************************************/
2418 #define CsrWifiSmeMulticastAddressCfmCreate(msg__, dst__, src__, interfaceTag__, status__, action__, getAddressesCount__, getAddresses__) \
2419 msg__ = (CsrWifiSmeMulticastAddressCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeMulticastAddressCfm)); \
2420 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_MULTICAST_ADDRESS_CFM, dst__, src__); \
2421 msg__->interfaceTag = (interfaceTag__); \
2422 msg__->status = (status__); \
2423 msg__->action = (action__); \
2424 msg__->getAddressesCount = (getAddressesCount__); \
2425 msg__->getAddresses = (getAddresses__);
2427 #define CsrWifiSmeMulticastAddressCfmSendTo(dst__, src__, interfaceTag__, status__, action__, getAddressesCount__, getAddresses__) \
2429 CsrWifiSmeMulticastAddressCfm *msg__; \
2430 CsrWifiSmeMulticastAddressCfmCreate(msg__, dst__, src__, interfaceTag__, status__, action__, getAddressesCount__, getAddresses__); \
2431 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2434 #define CsrWifiSmeMulticastAddressCfmSend(dst__, interfaceTag__, status__, action__, getAddressesCount__, getAddresses__) \
2435 CsrWifiSmeMulticastAddressCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, action__, getAddressesCount__, getAddresses__)
2437 /*******************************************************************************
2440 CsrWifiSmePacketFilterSetReqSend
2443 The wireless manager application should call this primitive to enable or
2444 disable filtering of broadcast packets: uninteresting broadcast packets
2445 will be dropped by the Wi-Fi chip, instead of passing them up to the
2447 This has the advantage of saving power in the host application processor
2448 as it removes the need to process unwanted packets.
2449 All broadcast packets are filtered according to the filter and the filter
2450 mode provided, except ARP packets, which are filtered using
2452 Filters are not cumulative: only the parameters specified in the most
2453 recent successful request are significant.
2454 For more information, see 'UniFi Firmware API Specification'.
2457 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
2458 interfaceTag - Interface Identifier; unique identifier of an interface
2459 filterLength - Length of the filter in bytes.
2460 filterLength=0 disables the filter previously set
2461 filter - Points to the first byte of the filter provided, if any.
2462 This shall include zero or more instance of the
2463 information elements of one of these types
2464 * Traffic Classification (TCLAS) elements
2465 * WMM-SA TCLAS elements
2466 mode - Specifies whether the filter selects or excludes packets
2468 arpFilterAddress - IPv4 address to be used for filtering the ARP packets.
2469 * If the specified address is the IPv4 broadcast address
2470 (255.255.255.255), all ARP packets are reported to the
2472 * If the specified address is NOT the IPv4 broadcast
2473 address, only ARP packets with the specified address in
2474 the Source or Target Protocol Address fields are reported
2477 *******************************************************************************/
2478 #define CsrWifiSmePacketFilterSetReqCreate(msg__, dst__, src__, interfaceTag__, filterLength__, filter__, mode__, arpFilterAddress__) \
2479 msg__ = (CsrWifiSmePacketFilterSetReq *) CsrPmemAlloc(sizeof(CsrWifiSmePacketFilterSetReq)); \
2480 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_PACKET_FILTER_SET_REQ, dst__, src__); \
2481 msg__->interfaceTag = (interfaceTag__); \
2482 msg__->filterLength = (filterLength__); \
2483 msg__->filter = (filter__); \
2484 msg__->mode = (mode__); \
2485 msg__->arpFilterAddress = (arpFilterAddress__);
2487 #define CsrWifiSmePacketFilterSetReqSendTo(dst__, src__, interfaceTag__, filterLength__, filter__, mode__, arpFilterAddress__) \
2489 CsrWifiSmePacketFilterSetReq *msg__; \
2490 CsrWifiSmePacketFilterSetReqCreate(msg__, dst__, src__, interfaceTag__, filterLength__, filter__, mode__, arpFilterAddress__); \
2491 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
2494 #define CsrWifiSmePacketFilterSetReqSend(src__, interfaceTag__, filterLength__, filter__, mode__, arpFilterAddress__) \
2495 CsrWifiSmePacketFilterSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__, filterLength__, filter__, mode__, arpFilterAddress__)
2497 /*******************************************************************************
2500 CsrWifiSmePacketFilterSetCfmSend
2503 The SME calls the primitive to report the result of the set primitive.
2506 queue - Destination Task Queue
2507 interfaceTag - Interface Identifier; unique identifier of an interface
2508 status - Reports the result of the request
2510 *******************************************************************************/
2511 #define CsrWifiSmePacketFilterSetCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
2512 msg__ = (CsrWifiSmePacketFilterSetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmePacketFilterSetCfm)); \
2513 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_PACKET_FILTER_SET_CFM, dst__, src__); \
2514 msg__->interfaceTag = (interfaceTag__); \
2515 msg__->status = (status__);
2517 #define CsrWifiSmePacketFilterSetCfmSendTo(dst__, src__, interfaceTag__, status__) \
2519 CsrWifiSmePacketFilterSetCfm *msg__; \
2520 CsrWifiSmePacketFilterSetCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
2521 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2524 #define CsrWifiSmePacketFilterSetCfmSend(dst__, interfaceTag__, status__) \
2525 CsrWifiSmePacketFilterSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
2527 /*******************************************************************************
2530 CsrWifiSmePermanentMacAddressGetReqSend
2533 This primitive retrieves the MAC address stored in EEPROM
2536 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
2538 *******************************************************************************/
2539 #define CsrWifiSmePermanentMacAddressGetReqCreate(msg__, dst__, src__) \
2540 msg__ = (CsrWifiSmePermanentMacAddressGetReq *) CsrPmemAlloc(sizeof(CsrWifiSmePermanentMacAddressGetReq)); \
2541 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_PERMANENT_MAC_ADDRESS_GET_REQ, dst__, src__);
2543 #define CsrWifiSmePermanentMacAddressGetReqSendTo(dst__, src__) \
2545 CsrWifiSmePermanentMacAddressGetReq *msg__; \
2546 CsrWifiSmePermanentMacAddressGetReqCreate(msg__, dst__, src__); \
2547 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
2550 #define CsrWifiSmePermanentMacAddressGetReqSend(src__) \
2551 CsrWifiSmePermanentMacAddressGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
2553 /*******************************************************************************
2556 CsrWifiSmePermanentMacAddressGetCfmSend
2559 This primitive reports the result of the request.
2562 queue - Destination Task Queue
2563 status - Reports the result of the request
2564 permanentMacAddress - MAC address stored in the EEPROM
2566 *******************************************************************************/
2567 #define CsrWifiSmePermanentMacAddressGetCfmCreate(msg__, dst__, src__, status__, permanentMacAddress__) \
2568 msg__ = (CsrWifiSmePermanentMacAddressGetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmePermanentMacAddressGetCfm)); \
2569 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_PERMANENT_MAC_ADDRESS_GET_CFM, dst__, src__); \
2570 msg__->status = (status__); \
2571 msg__->permanentMacAddress = (permanentMacAddress__);
2573 #define CsrWifiSmePermanentMacAddressGetCfmSendTo(dst__, src__, status__, permanentMacAddress__) \
2575 CsrWifiSmePermanentMacAddressGetCfm *msg__; \
2576 CsrWifiSmePermanentMacAddressGetCfmCreate(msg__, dst__, src__, status__, permanentMacAddress__); \
2577 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2580 #define CsrWifiSmePermanentMacAddressGetCfmSend(dst__, status__, permanentMacAddress__) \
2581 CsrWifiSmePermanentMacAddressGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, permanentMacAddress__)
2583 /*******************************************************************************
2586 CsrWifiSmePmkidCandidateListIndSend
2589 The SME will send this primitive to all the tasks that have registered to
2590 receive it when a new network supporting preauthentication and/or PMK
2594 queue - Destination Task Queue
2595 interfaceTag - Interface Identifier; unique identifier of an
2597 pmkidCandidatesCount - Number of PMKID candidates provided
2598 pmkidCandidates - Points to the first PMKID candidate
2600 *******************************************************************************/
2601 #define CsrWifiSmePmkidCandidateListIndCreate(msg__, dst__, src__, interfaceTag__, pmkidCandidatesCount__, pmkidCandidates__) \
2602 msg__ = (CsrWifiSmePmkidCandidateListInd *) CsrPmemAlloc(sizeof(CsrWifiSmePmkidCandidateListInd)); \
2603 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_PMKID_CANDIDATE_LIST_IND, dst__, src__); \
2604 msg__->interfaceTag = (interfaceTag__); \
2605 msg__->pmkidCandidatesCount = (pmkidCandidatesCount__); \
2606 msg__->pmkidCandidates = (pmkidCandidates__);
2608 #define CsrWifiSmePmkidCandidateListIndSendTo(dst__, src__, interfaceTag__, pmkidCandidatesCount__, pmkidCandidates__) \
2610 CsrWifiSmePmkidCandidateListInd *msg__; \
2611 CsrWifiSmePmkidCandidateListIndCreate(msg__, dst__, src__, interfaceTag__, pmkidCandidatesCount__, pmkidCandidates__); \
2612 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2615 #define CsrWifiSmePmkidCandidateListIndSend(dst__, interfaceTag__, pmkidCandidatesCount__, pmkidCandidates__) \
2616 CsrWifiSmePmkidCandidateListIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, pmkidCandidatesCount__, pmkidCandidates__)
2618 /*******************************************************************************
2621 CsrWifiSmePmkidReqSend
2624 The wireless manager application calls this primitive to request an
2625 operation on the SME PMKID list.
2626 The action argument specifies the operation to perform.
2627 When the connection is complete, the wireless manager application may
2628 then send and receive EAPOL packets to complete WPA or WPA2
2629 authentication if appropriate.
2630 The wireless manager application can then pass the resulting encryption
2631 keys using this primitive.
2634 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
2635 interfaceTag - Interface Identifier; unique identifier of an interface
2636 action - The value of the CsrWifiSmeListAction parameter instructs
2637 the driver to modify or provide the list of PMKIDs.
2638 setPmkidsCount - Number of PMKIDs sent with the primitive
2639 setPmkids - Pointer to the list of PMKIDs sent with the primitive, set
2640 to NULL if none is sent.
2642 *******************************************************************************/
2643 #define CsrWifiSmePmkidReqCreate(msg__, dst__, src__, interfaceTag__, action__, setPmkidsCount__, setPmkids__) \
2644 msg__ = (CsrWifiSmePmkidReq *) CsrPmemAlloc(sizeof(CsrWifiSmePmkidReq)); \
2645 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_PMKID_REQ, dst__, src__); \
2646 msg__->interfaceTag = (interfaceTag__); \
2647 msg__->action = (action__); \
2648 msg__->setPmkidsCount = (setPmkidsCount__); \
2649 msg__->setPmkids = (setPmkids__);
2651 #define CsrWifiSmePmkidReqSendTo(dst__, src__, interfaceTag__, action__, setPmkidsCount__, setPmkids__) \
2653 CsrWifiSmePmkidReq *msg__; \
2654 CsrWifiSmePmkidReqCreate(msg__, dst__, src__, interfaceTag__, action__, setPmkidsCount__, setPmkids__); \
2655 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
2658 #define CsrWifiSmePmkidReqSend(src__, interfaceTag__, action__, setPmkidsCount__, setPmkids__) \
2659 CsrWifiSmePmkidReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__, action__, setPmkidsCount__, setPmkids__)
2661 /*******************************************************************************
2664 CsrWifiSmePmkidCfmSend
2667 The SME will call this primitive when the operation is complete. For a
2668 GET action, this primitive reports the current list of PMKIDs
2671 queue - Destination Task Queue
2672 interfaceTag - Interface Identifier; unique identifier of an interface
2673 status - Reports the result of the request
2674 action - Action in the request
2675 getPmkidsCount - This parameter is only relevant if action is
2676 CSR_WIFI_SME_LIST_ACTION_GET:
2677 number of PMKIDs sent with the primitive
2678 getPmkids - Pointer to the list of PMKIDs sent with the primitive, set
2679 to NULL if none is sent.
2681 *******************************************************************************/
2682 #define CsrWifiSmePmkidCfmCreate(msg__, dst__, src__, interfaceTag__, status__, action__, getPmkidsCount__, getPmkids__) \
2683 msg__ = (CsrWifiSmePmkidCfm *) CsrPmemAlloc(sizeof(CsrWifiSmePmkidCfm)); \
2684 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_PMKID_CFM, dst__, src__); \
2685 msg__->interfaceTag = (interfaceTag__); \
2686 msg__->status = (status__); \
2687 msg__->action = (action__); \
2688 msg__->getPmkidsCount = (getPmkidsCount__); \
2689 msg__->getPmkids = (getPmkids__);
2691 #define CsrWifiSmePmkidCfmSendTo(dst__, src__, interfaceTag__, status__, action__, getPmkidsCount__, getPmkids__) \
2693 CsrWifiSmePmkidCfm *msg__; \
2694 CsrWifiSmePmkidCfmCreate(msg__, dst__, src__, interfaceTag__, status__, action__, getPmkidsCount__, getPmkids__); \
2695 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2698 #define CsrWifiSmePmkidCfmSend(dst__, interfaceTag__, status__, action__, getPmkidsCount__, getPmkids__) \
2699 CsrWifiSmePmkidCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, action__, getPmkidsCount__, getPmkids__)
2701 /*******************************************************************************
2704 CsrWifiSmePowerConfigGetReqSend
2707 This primitive gets the value of the PowerConfig parameter.
2710 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
2712 *******************************************************************************/
2713 #define CsrWifiSmePowerConfigGetReqCreate(msg__, dst__, src__) \
2714 msg__ = (CsrWifiSmePowerConfigGetReq *) CsrPmemAlloc(sizeof(CsrWifiSmePowerConfigGetReq)); \
2715 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_POWER_CONFIG_GET_REQ, dst__, src__);
2717 #define CsrWifiSmePowerConfigGetReqSendTo(dst__, src__) \
2719 CsrWifiSmePowerConfigGetReq *msg__; \
2720 CsrWifiSmePowerConfigGetReqCreate(msg__, dst__, src__); \
2721 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
2724 #define CsrWifiSmePowerConfigGetReqSend(src__) \
2725 CsrWifiSmePowerConfigGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
2727 /*******************************************************************************
2730 CsrWifiSmePowerConfigGetCfmSend
2733 This primitive reports the result of the request.
2736 queue - Destination Task Queue
2737 status - Reports the result of the request
2738 powerConfig - Returns the current parameters for the power configuration of
2741 *******************************************************************************/
2742 #define CsrWifiSmePowerConfigGetCfmCreate(msg__, dst__, src__, status__, powerConfig__) \
2743 msg__ = (CsrWifiSmePowerConfigGetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmePowerConfigGetCfm)); \
2744 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_POWER_CONFIG_GET_CFM, dst__, src__); \
2745 msg__->status = (status__); \
2746 msg__->powerConfig = (powerConfig__);
2748 #define CsrWifiSmePowerConfigGetCfmSendTo(dst__, src__, status__, powerConfig__) \
2750 CsrWifiSmePowerConfigGetCfm *msg__; \
2751 CsrWifiSmePowerConfigGetCfmCreate(msg__, dst__, src__, status__, powerConfig__); \
2752 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2755 #define CsrWifiSmePowerConfigGetCfmSend(dst__, status__, powerConfig__) \
2756 CsrWifiSmePowerConfigGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, powerConfig__)
2758 /*******************************************************************************
2761 CsrWifiSmePowerConfigSetReqSend
2764 This primitive sets the value of the PowerConfig parameter.
2767 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
2768 powerConfig - Power saving configuration
2770 *******************************************************************************/
2771 #define CsrWifiSmePowerConfigSetReqCreate(msg__, dst__, src__, powerConfig__) \
2772 msg__ = (CsrWifiSmePowerConfigSetReq *) CsrPmemAlloc(sizeof(CsrWifiSmePowerConfigSetReq)); \
2773 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_POWER_CONFIG_SET_REQ, dst__, src__); \
2774 msg__->powerConfig = (powerConfig__);
2776 #define CsrWifiSmePowerConfigSetReqSendTo(dst__, src__, powerConfig__) \
2778 CsrWifiSmePowerConfigSetReq *msg__; \
2779 CsrWifiSmePowerConfigSetReqCreate(msg__, dst__, src__, powerConfig__); \
2780 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
2783 #define CsrWifiSmePowerConfigSetReqSend(src__, powerConfig__) \
2784 CsrWifiSmePowerConfigSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, powerConfig__)
2786 /*******************************************************************************
2789 CsrWifiSmePowerConfigSetCfmSend
2792 This primitive reports the result of the request.
2795 queue - Destination Task Queue
2796 status - Reports the result of the request
2798 *******************************************************************************/
2799 #define CsrWifiSmePowerConfigSetCfmCreate(msg__, dst__, src__, status__) \
2800 msg__ = (CsrWifiSmePowerConfigSetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmePowerConfigSetCfm)); \
2801 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_POWER_CONFIG_SET_CFM, dst__, src__); \
2802 msg__->status = (status__);
2804 #define CsrWifiSmePowerConfigSetCfmSendTo(dst__, src__, status__) \
2806 CsrWifiSmePowerConfigSetCfm *msg__; \
2807 CsrWifiSmePowerConfigSetCfmCreate(msg__, dst__, src__, status__); \
2808 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2811 #define CsrWifiSmePowerConfigSetCfmSend(dst__, status__) \
2812 CsrWifiSmePowerConfigSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
2814 /*******************************************************************************
2817 CsrWifiSmeRegulatoryDomainInfoGetReqSend
2820 This primitive gets the value of the RegulatoryDomainInfo parameter.
2823 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
2825 *******************************************************************************/
2826 #define CsrWifiSmeRegulatoryDomainInfoGetReqCreate(msg__, dst__, src__) \
2827 msg__ = (CsrWifiSmeRegulatoryDomainInfoGetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeRegulatoryDomainInfoGetReq)); \
2828 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_REGULATORY_DOMAIN_INFO_GET_REQ, dst__, src__);
2830 #define CsrWifiSmeRegulatoryDomainInfoGetReqSendTo(dst__, src__) \
2832 CsrWifiSmeRegulatoryDomainInfoGetReq *msg__; \
2833 CsrWifiSmeRegulatoryDomainInfoGetReqCreate(msg__, dst__, src__); \
2834 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
2837 #define CsrWifiSmeRegulatoryDomainInfoGetReqSend(src__) \
2838 CsrWifiSmeRegulatoryDomainInfoGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
2840 /*******************************************************************************
2843 CsrWifiSmeRegulatoryDomainInfoGetCfmSend
2846 This primitive reports the result of the request.
2849 queue - Destination Task Queue
2850 status - Reports the result of the request
2851 regDomInfo - Reports information and state related to regulatory domain
2854 *******************************************************************************/
2855 #define CsrWifiSmeRegulatoryDomainInfoGetCfmCreate(msg__, dst__, src__, status__, regDomInfo__) \
2856 msg__ = (CsrWifiSmeRegulatoryDomainInfoGetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeRegulatoryDomainInfoGetCfm)); \
2857 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_REGULATORY_DOMAIN_INFO_GET_CFM, dst__, src__); \
2858 msg__->status = (status__); \
2859 msg__->regDomInfo = (regDomInfo__);
2861 #define CsrWifiSmeRegulatoryDomainInfoGetCfmSendTo(dst__, src__, status__, regDomInfo__) \
2863 CsrWifiSmeRegulatoryDomainInfoGetCfm *msg__; \
2864 CsrWifiSmeRegulatoryDomainInfoGetCfmCreate(msg__, dst__, src__, status__, regDomInfo__); \
2865 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2868 #define CsrWifiSmeRegulatoryDomainInfoGetCfmSend(dst__, status__, regDomInfo__) \
2869 CsrWifiSmeRegulatoryDomainInfoGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, regDomInfo__)
2871 /*******************************************************************************
2874 CsrWifiSmeRoamCompleteIndSend
2877 The SME will send this primitive to all the tasks that have registered to
2878 receive it whenever it completes an attempt to roam to an AP. If the roam
2879 attempt was successful, status will be set to CSR_WIFI_SME_SUCCESS,
2880 otherwise it shall be set to the appropriate error code.
2883 queue - Destination Task Queue
2884 interfaceTag - Interface Identifier; unique identifier of an interface
2885 status - Reports the result of the roaming procedure
2887 *******************************************************************************/
2888 #define CsrWifiSmeRoamCompleteIndCreate(msg__, dst__, src__, interfaceTag__, status__) \
2889 msg__ = (CsrWifiSmeRoamCompleteInd *) CsrPmemAlloc(sizeof(CsrWifiSmeRoamCompleteInd)); \
2890 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ROAM_COMPLETE_IND, dst__, src__); \
2891 msg__->interfaceTag = (interfaceTag__); \
2892 msg__->status = (status__);
2894 #define CsrWifiSmeRoamCompleteIndSendTo(dst__, src__, interfaceTag__, status__) \
2896 CsrWifiSmeRoamCompleteInd *msg__; \
2897 CsrWifiSmeRoamCompleteIndCreate(msg__, dst__, src__, interfaceTag__, status__); \
2898 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2901 #define CsrWifiSmeRoamCompleteIndSend(dst__, interfaceTag__, status__) \
2902 CsrWifiSmeRoamCompleteIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
2904 /*******************************************************************************
2907 CsrWifiSmeRoamStartIndSend
2910 The SME will send this primitive to all the tasks that have registered to
2911 receive it whenever it begins an attempt to roam to an AP.
2912 If the wireless manager application connect request specified the SSID
2913 and the BSSID was set to the broadcast address (0xFF 0xFF 0xFF 0xFF 0xFF
2914 0xFF), the SME monitors the signal quality and maintains a list of
2915 candidates to roam to. When the signal quality of the current connection
2916 falls below a threshold, and there is a candidate with better quality,
2917 the SME will attempt to the candidate AP.
2918 If the roaming procedure succeeds, the SME will also issue a Media
2919 Connect indication to inform the wireless manager application of the
2921 NOTE: to prevent the SME from initiating roaming the WMA must specify the
2922 BSSID in the connection request; this forces the SME to connect only to
2924 The wireless manager application can obtain statistics for roaming
2925 purposes using CSR_WIFI_SME_CONNECTION_QUALITY_IND and
2926 CSR_WIFI_SME_CONNECTION_STATS_GET_REQ.
2927 When the wireless manager application wishes to roam to another AP, it
2928 must issue a connection request specifying the BSSID of the desired AP.
2931 queue - Destination Task Queue
2932 interfaceTag - Interface Identifier; unique identifier of an interface
2933 roamReason - Indicates the reason for starting the roaming procedure
2934 reason80211 - Indicates the reason for deauthentication or disassociation
2936 *******************************************************************************/
2937 #define CsrWifiSmeRoamStartIndCreate(msg__, dst__, src__, interfaceTag__, roamReason__, reason80211__) \
2938 msg__ = (CsrWifiSmeRoamStartInd *) CsrPmemAlloc(sizeof(CsrWifiSmeRoamStartInd)); \
2939 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ROAM_START_IND, dst__, src__); \
2940 msg__->interfaceTag = (interfaceTag__); \
2941 msg__->roamReason = (roamReason__); \
2942 msg__->reason80211 = (reason80211__);
2944 #define CsrWifiSmeRoamStartIndSendTo(dst__, src__, interfaceTag__, roamReason__, reason80211__) \
2946 CsrWifiSmeRoamStartInd *msg__; \
2947 CsrWifiSmeRoamStartIndCreate(msg__, dst__, src__, interfaceTag__, roamReason__, reason80211__); \
2948 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2951 #define CsrWifiSmeRoamStartIndSend(dst__, interfaceTag__, roamReason__, reason80211__) \
2952 CsrWifiSmeRoamStartIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, roamReason__, reason80211__)
2954 /*******************************************************************************
2957 CsrWifiSmeRoamingConfigGetReqSend
2960 This primitive gets the value of the RoamingConfig parameter.
2963 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
2964 interfaceTag - Interface Identifier; unique identifier of an interface
2966 *******************************************************************************/
2967 #define CsrWifiSmeRoamingConfigGetReqCreate(msg__, dst__, src__, interfaceTag__) \
2968 msg__ = (CsrWifiSmeRoamingConfigGetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeRoamingConfigGetReq)); \
2969 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ROAMING_CONFIG_GET_REQ, dst__, src__); \
2970 msg__->interfaceTag = (interfaceTag__);
2972 #define CsrWifiSmeRoamingConfigGetReqSendTo(dst__, src__, interfaceTag__) \
2974 CsrWifiSmeRoamingConfigGetReq *msg__; \
2975 CsrWifiSmeRoamingConfigGetReqCreate(msg__, dst__, src__, interfaceTag__); \
2976 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
2979 #define CsrWifiSmeRoamingConfigGetReqSend(src__, interfaceTag__) \
2980 CsrWifiSmeRoamingConfigGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__)
2982 /*******************************************************************************
2985 CsrWifiSmeRoamingConfigGetCfmSend
2988 This primitive reports the result of the request.
2991 queue - Destination Task Queue
2992 interfaceTag - Interface Identifier; unique identifier of an interface
2993 status - Reports the result of the request
2994 roamingConfig - Reports the roaming behaviour of the driver and firmware
2996 *******************************************************************************/
2997 #define CsrWifiSmeRoamingConfigGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, roamingConfig__) \
2998 msg__ = (CsrWifiSmeRoamingConfigGetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeRoamingConfigGetCfm)); \
2999 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ROAMING_CONFIG_GET_CFM, dst__, src__); \
3000 msg__->interfaceTag = (interfaceTag__); \
3001 msg__->status = (status__); \
3002 msg__->roamingConfig = (roamingConfig__);
3004 #define CsrWifiSmeRoamingConfigGetCfmSendTo(dst__, src__, interfaceTag__, status__, roamingConfig__) \
3006 CsrWifiSmeRoamingConfigGetCfm *msg__; \
3007 CsrWifiSmeRoamingConfigGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, roamingConfig__); \
3008 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3011 #define CsrWifiSmeRoamingConfigGetCfmSend(dst__, interfaceTag__, status__, roamingConfig__) \
3012 CsrWifiSmeRoamingConfigGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, roamingConfig__)
3014 /*******************************************************************************
3017 CsrWifiSmeRoamingConfigSetReqSend
3020 This primitive sets the value of the RoamingConfig parameter.
3023 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3024 interfaceTag - Interface Identifier; unique identifier of an interface
3025 roamingConfig - Desired roaming behaviour values
3027 *******************************************************************************/
3028 #define CsrWifiSmeRoamingConfigSetReqCreate(msg__, dst__, src__, interfaceTag__, roamingConfig__) \
3029 msg__ = (CsrWifiSmeRoamingConfigSetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeRoamingConfigSetReq)); \
3030 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ROAMING_CONFIG_SET_REQ, dst__, src__); \
3031 msg__->interfaceTag = (interfaceTag__); \
3032 msg__->roamingConfig = (roamingConfig__);
3034 #define CsrWifiSmeRoamingConfigSetReqSendTo(dst__, src__, interfaceTag__, roamingConfig__) \
3036 CsrWifiSmeRoamingConfigSetReq *msg__; \
3037 CsrWifiSmeRoamingConfigSetReqCreate(msg__, dst__, src__, interfaceTag__, roamingConfig__); \
3038 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
3041 #define CsrWifiSmeRoamingConfigSetReqSend(src__, interfaceTag__, roamingConfig__) \
3042 CsrWifiSmeRoamingConfigSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__, roamingConfig__)
3044 /*******************************************************************************
3047 CsrWifiSmeRoamingConfigSetCfmSend
3050 This primitive sets the value of the RoamingConfig parameter.
3053 queue - Destination Task Queue
3054 interfaceTag - Interface Identifier; unique identifier of an interface
3055 status - Reports the result of the request
3057 *******************************************************************************/
3058 #define CsrWifiSmeRoamingConfigSetCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
3059 msg__ = (CsrWifiSmeRoamingConfigSetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeRoamingConfigSetCfm)); \
3060 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ROAMING_CONFIG_SET_CFM, dst__, src__); \
3061 msg__->interfaceTag = (interfaceTag__); \
3062 msg__->status = (status__);
3064 #define CsrWifiSmeRoamingConfigSetCfmSendTo(dst__, src__, interfaceTag__, status__) \
3066 CsrWifiSmeRoamingConfigSetCfm *msg__; \
3067 CsrWifiSmeRoamingConfigSetCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
3068 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3071 #define CsrWifiSmeRoamingConfigSetCfmSend(dst__, interfaceTag__, status__) \
3072 CsrWifiSmeRoamingConfigSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
3074 /*******************************************************************************
3077 CsrWifiSmeScanConfigGetReqSend
3080 This primitive gets the value of the ScanConfig parameter.
3083 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3085 *******************************************************************************/
3086 #define CsrWifiSmeScanConfigGetReqCreate(msg__, dst__, src__) \
3087 msg__ = (CsrWifiSmeScanConfigGetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeScanConfigGetReq)); \
3088 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SCAN_CONFIG_GET_REQ, dst__, src__);
3090 #define CsrWifiSmeScanConfigGetReqSendTo(dst__, src__) \
3092 CsrWifiSmeScanConfigGetReq *msg__; \
3093 CsrWifiSmeScanConfigGetReqCreate(msg__, dst__, src__); \
3094 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
3097 #define CsrWifiSmeScanConfigGetReqSend(src__) \
3098 CsrWifiSmeScanConfigGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
3100 /*******************************************************************************
3103 CsrWifiSmeScanConfigGetCfmSend
3106 This primitive reports the result of the request.
3109 queue - Destination Task Queue
3110 status - Reports the result of the request
3111 scanConfig - Returns the current parameters for the autonomous scanning
3112 behaviour of the firmware
3114 *******************************************************************************/
3115 #define CsrWifiSmeScanConfigGetCfmCreate(msg__, dst__, src__, status__, scanConfig__) \
3116 msg__ = (CsrWifiSmeScanConfigGetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeScanConfigGetCfm)); \
3117 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SCAN_CONFIG_GET_CFM, dst__, src__); \
3118 msg__->status = (status__); \
3119 msg__->scanConfig = (scanConfig__);
3121 #define CsrWifiSmeScanConfigGetCfmSendTo(dst__, src__, status__, scanConfig__) \
3123 CsrWifiSmeScanConfigGetCfm *msg__; \
3124 CsrWifiSmeScanConfigGetCfmCreate(msg__, dst__, src__, status__, scanConfig__); \
3125 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3128 #define CsrWifiSmeScanConfigGetCfmSend(dst__, status__, scanConfig__) \
3129 CsrWifiSmeScanConfigGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, scanConfig__)
3131 /*******************************************************************************
3134 CsrWifiSmeScanConfigSetReqSend
3137 This primitive sets the value of the ScanConfig parameter.
3138 The SME normally configures the firmware to perform autonomous scanning
3139 without involving the host.
3140 The firmware passes beacon / probe response or indicates loss of beacon
3141 on certain changes of state, for example:
3142 * A new AP is seen for the first time
3143 * An AP is no longer visible
3144 * The signal strength of an AP changes by more than a certain amount, as
3145 configured by the thresholds in the scanConfig parameter
3146 In addition to the autonomous scan, the wireless manager application may
3147 request a scan at any time using CSR_WIFI_SME_SCAN_FULL_REQ.
3150 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3151 scanConfig - Reports the configuration for the autonomous scanning behaviour
3154 *******************************************************************************/
3155 #define CsrWifiSmeScanConfigSetReqCreate(msg__, dst__, src__, scanConfig__) \
3156 msg__ = (CsrWifiSmeScanConfigSetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeScanConfigSetReq)); \
3157 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SCAN_CONFIG_SET_REQ, dst__, src__); \
3158 msg__->scanConfig = (scanConfig__);
3160 #define CsrWifiSmeScanConfigSetReqSendTo(dst__, src__, scanConfig__) \
3162 CsrWifiSmeScanConfigSetReq *msg__; \
3163 CsrWifiSmeScanConfigSetReqCreate(msg__, dst__, src__, scanConfig__); \
3164 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
3167 #define CsrWifiSmeScanConfigSetReqSend(src__, scanConfig__) \
3168 CsrWifiSmeScanConfigSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, scanConfig__)
3170 /*******************************************************************************
3173 CsrWifiSmeScanConfigSetCfmSend
3176 This primitive reports the result of the request.
3179 queue - Destination Task Queue
3180 status - Reports the result of the request
3182 *******************************************************************************/
3183 #define CsrWifiSmeScanConfigSetCfmCreate(msg__, dst__, src__, status__) \
3184 msg__ = (CsrWifiSmeScanConfigSetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeScanConfigSetCfm)); \
3185 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SCAN_CONFIG_SET_CFM, dst__, src__); \
3186 msg__->status = (status__);
3188 #define CsrWifiSmeScanConfigSetCfmSendTo(dst__, src__, status__) \
3190 CsrWifiSmeScanConfigSetCfm *msg__; \
3191 CsrWifiSmeScanConfigSetCfmCreate(msg__, dst__, src__, status__); \
3192 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3195 #define CsrWifiSmeScanConfigSetCfmSend(dst__, status__) \
3196 CsrWifiSmeScanConfigSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
3198 /*******************************************************************************
3201 CsrWifiSmeScanFullReqSend
3204 The wireless manager application should call this primitive to request a
3206 Channels are scanned actively or passively according to the requirement
3207 set by regulatory domain.
3208 If the SME receives this primitive while a full scan is going on, the new
3209 request is buffered and it will be served after the current full scan is
3213 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3214 ssidCount - Number of SSIDs provided.
3215 If it is 0, the SME will attempt to detect any network
3216 ssid - Points to the first SSID provided, if any.
3217 bssid - BSS identifier.
3218 If it is equal to FF-FF-FF-FF-FF, the SME will listen for
3219 messages from any BSS.
3220 If it is different from FF-FF-FF-FF-FF and any SSID is
3221 provided, one SSID must match the network of the BSS.
3222 forceScan - Forces the scan even if the SME is in a state which would
3223 normally prevent it (e.g. autonomous scan is running).
3224 bssType - Type of BSS to scan for
3225 scanType - Type of scan to perform
3226 channelListCount - Number of channels provided.
3227 If it is 0, the SME will initiate a scan of all the
3228 supported channels that are permitted by the current
3230 channelList - Points to the first channel , or NULL if channelListCount
3232 probeIeLength - Length of the information element in bytes to be sent
3233 with the probe message.
3234 probeIe - Points to the first byte of the information element to be
3235 sent with the probe message.
3237 *******************************************************************************/
3238 #define CsrWifiSmeScanFullReqCreate(msg__, dst__, src__, ssidCount__, ssid__, bssid__, forceScan__, bssType__, scanType__, channelListCount__, channelList__, probeIeLength__, probeIe__) \
3239 msg__ = (CsrWifiSmeScanFullReq *) CsrPmemAlloc(sizeof(CsrWifiSmeScanFullReq)); \
3240 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SCAN_FULL_REQ, dst__, src__); \
3241 msg__->ssidCount = (ssidCount__); \
3242 msg__->ssid = (ssid__); \
3243 msg__->bssid = (bssid__); \
3244 msg__->forceScan = (forceScan__); \
3245 msg__->bssType = (bssType__); \
3246 msg__->scanType = (scanType__); \
3247 msg__->channelListCount = (channelListCount__); \
3248 msg__->channelList = (channelList__); \
3249 msg__->probeIeLength = (probeIeLength__); \
3250 msg__->probeIe = (probeIe__);
3252 #define CsrWifiSmeScanFullReqSendTo(dst__, src__, ssidCount__, ssid__, bssid__, forceScan__, bssType__, scanType__, channelListCount__, channelList__, probeIeLength__, probeIe__) \
3254 CsrWifiSmeScanFullReq *msg__; \
3255 CsrWifiSmeScanFullReqCreate(msg__, dst__, src__, ssidCount__, ssid__, bssid__, forceScan__, bssType__, scanType__, channelListCount__, channelList__, probeIeLength__, probeIe__); \
3256 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
3259 #define CsrWifiSmeScanFullReqSend(src__, ssidCount__, ssid__, bssid__, forceScan__, bssType__, scanType__, channelListCount__, channelList__, probeIeLength__, probeIe__) \
3260 CsrWifiSmeScanFullReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, ssidCount__, ssid__, bssid__, forceScan__, bssType__, scanType__, channelListCount__, channelList__, probeIeLength__, probeIe__)
3262 /*******************************************************************************
3265 CsrWifiSmeScanFullCfmSend
3268 The SME calls this primitive when the results from the scan are
3272 queue - Destination Task Queue
3273 status - Reports the result of the request
3275 *******************************************************************************/
3276 #define CsrWifiSmeScanFullCfmCreate(msg__, dst__, src__, status__) \
3277 msg__ = (CsrWifiSmeScanFullCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeScanFullCfm)); \
3278 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SCAN_FULL_CFM, dst__, src__); \
3279 msg__->status = (status__);
3281 #define CsrWifiSmeScanFullCfmSendTo(dst__, src__, status__) \
3283 CsrWifiSmeScanFullCfm *msg__; \
3284 CsrWifiSmeScanFullCfmCreate(msg__, dst__, src__, status__); \
3285 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3288 #define CsrWifiSmeScanFullCfmSend(dst__, status__) \
3289 CsrWifiSmeScanFullCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
3291 /*******************************************************************************
3294 CsrWifiSmeScanResultIndSend
3297 The SME sends this primitive to all the tasks that have registered to
3298 receive it whenever a scan indication is received from the firmware.
3301 queue - Destination Task Queue
3302 result - Points to a buffer containing a scan result.
3304 *******************************************************************************/
3305 #define CsrWifiSmeScanResultIndCreate(msg__, dst__, src__, result__) \
3306 msg__ = (CsrWifiSmeScanResultInd *) CsrPmemAlloc(sizeof(CsrWifiSmeScanResultInd)); \
3307 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SCAN_RESULT_IND, dst__, src__); \
3308 msg__->result = (result__);
3310 #define CsrWifiSmeScanResultIndSendTo(dst__, src__, result__) \
3312 CsrWifiSmeScanResultInd *msg__; \
3313 CsrWifiSmeScanResultIndCreate(msg__, dst__, src__, result__); \
3314 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3317 #define CsrWifiSmeScanResultIndSend(dst__, result__) \
3318 CsrWifiSmeScanResultIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, result__)
3320 /*******************************************************************************
3323 CsrWifiSmeScanResultsFlushReqSend
3326 The Wireless Manager calls this primitive to ask the SME to delete all
3327 scan results from its cache, except for the scan result of any currently
3329 As scan results are received by the SME from the firmware, they are
3330 cached in the SME memory.
3331 Any time the Wireless Manager requests scan results, they are returned
3332 from the SME internal cache.
3333 For some applications it may be desirable to clear this cache prior to
3334 requesting that a scan be performed; this will ensure that the cache then
3335 only contains the networks detected in the most recent scan.
3338 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3340 *******************************************************************************/
3341 #define CsrWifiSmeScanResultsFlushReqCreate(msg__, dst__, src__) \
3342 msg__ = (CsrWifiSmeScanResultsFlushReq *) CsrPmemAlloc(sizeof(CsrWifiSmeScanResultsFlushReq)); \
3343 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SCAN_RESULTS_FLUSH_REQ, dst__, src__);
3345 #define CsrWifiSmeScanResultsFlushReqSendTo(dst__, src__) \
3347 CsrWifiSmeScanResultsFlushReq *msg__; \
3348 CsrWifiSmeScanResultsFlushReqCreate(msg__, dst__, src__); \
3349 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
3352 #define CsrWifiSmeScanResultsFlushReqSend(src__) \
3353 CsrWifiSmeScanResultsFlushReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
3355 /*******************************************************************************
3358 CsrWifiSmeScanResultsFlushCfmSend
3361 The SME will call this primitive when the cache has been cleared.
3364 queue - Destination Task Queue
3365 status - Reports the result of the request
3367 *******************************************************************************/
3368 #define CsrWifiSmeScanResultsFlushCfmCreate(msg__, dst__, src__, status__) \
3369 msg__ = (CsrWifiSmeScanResultsFlushCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeScanResultsFlushCfm)); \
3370 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SCAN_RESULTS_FLUSH_CFM, dst__, src__); \
3371 msg__->status = (status__);
3373 #define CsrWifiSmeScanResultsFlushCfmSendTo(dst__, src__, status__) \
3375 CsrWifiSmeScanResultsFlushCfm *msg__; \
3376 CsrWifiSmeScanResultsFlushCfmCreate(msg__, dst__, src__, status__); \
3377 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3380 #define CsrWifiSmeScanResultsFlushCfmSend(dst__, status__) \
3381 CsrWifiSmeScanResultsFlushCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
3383 /*******************************************************************************
3386 CsrWifiSmeScanResultsGetReqSend
3389 The wireless manager application calls this primitive to retrieve the
3390 current set of scan results, either after receiving a successful
3391 CSR_WIFI_SME_SCAN_FULL_CFM, or to get autonomous scan results.
3394 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3396 *******************************************************************************/
3397 #define CsrWifiSmeScanResultsGetReqCreate(msg__, dst__, src__) \
3398 msg__ = (CsrWifiSmeScanResultsGetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeScanResultsGetReq)); \
3399 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SCAN_RESULTS_GET_REQ, dst__, src__);
3401 #define CsrWifiSmeScanResultsGetReqSendTo(dst__, src__) \
3403 CsrWifiSmeScanResultsGetReq *msg__; \
3404 CsrWifiSmeScanResultsGetReqCreate(msg__, dst__, src__); \
3405 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
3408 #define CsrWifiSmeScanResultsGetReqSend(src__) \
3409 CsrWifiSmeScanResultsGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
3411 /*******************************************************************************
3414 CsrWifiSmeScanResultsGetCfmSend
3417 The SME sends this primitive to provide the current set of scan results.
3420 queue - Destination Task Queue
3421 status - Reports the result of the request
3422 scanResultsCount - Number of scan results
3423 scanResults - Points to a buffer containing an array of
3424 CsrWifiSmeScanResult structures.
3426 *******************************************************************************/
3427 #define CsrWifiSmeScanResultsGetCfmCreate(msg__, dst__, src__, status__, scanResultsCount__, scanResults__) \
3428 msg__ = (CsrWifiSmeScanResultsGetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeScanResultsGetCfm)); \
3429 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SCAN_RESULTS_GET_CFM, dst__, src__); \
3430 msg__->status = (status__); \
3431 msg__->scanResultsCount = (scanResultsCount__); \
3432 msg__->scanResults = (scanResults__);
3434 #define CsrWifiSmeScanResultsGetCfmSendTo(dst__, src__, status__, scanResultsCount__, scanResults__) \
3436 CsrWifiSmeScanResultsGetCfm *msg__; \
3437 CsrWifiSmeScanResultsGetCfmCreate(msg__, dst__, src__, status__, scanResultsCount__, scanResults__); \
3438 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3441 #define CsrWifiSmeScanResultsGetCfmSend(dst__, status__, scanResultsCount__, scanResults__) \
3442 CsrWifiSmeScanResultsGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, scanResultsCount__, scanResults__)
3444 /*******************************************************************************
3447 CsrWifiSmeSetReqSend
3450 Used to pass custom data to the SME. Format is the same as 802.11 Info
3451 Elements => | Id | Length | Data
3452 1) Cmanr Test Mode "Id:0 Length:1 Data:0x00 = OFF 0x01 = ON" "0x00 0x01
3456 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3457 dataLength - Number of bytes in the buffer pointed to by 'data'
3458 data - Pointer to the buffer containing 'dataLength' bytes
3460 *******************************************************************************/
3461 #define CsrWifiSmeSetReqCreate(msg__, dst__, src__, dataLength__, data__) \
3462 msg__ = (CsrWifiSmeSetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeSetReq)); \
3463 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SET_REQ, dst__, src__); \
3464 msg__->dataLength = (dataLength__); \
3465 msg__->data = (data__);
3467 #define CsrWifiSmeSetReqSendTo(dst__, src__, dataLength__, data__) \
3469 CsrWifiSmeSetReq *msg__; \
3470 CsrWifiSmeSetReqCreate(msg__, dst__, src__, dataLength__, data__); \
3471 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
3474 #define CsrWifiSmeSetReqSend(src__, dataLength__, data__) \
3475 CsrWifiSmeSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, dataLength__, data__)
3477 /*******************************************************************************
3480 CsrWifiSmeSmeCommonConfigGetReqSend
3483 This primitive gets the value of the Sme common parameter.
3486 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3488 *******************************************************************************/
3489 #define CsrWifiSmeSmeCommonConfigGetReqCreate(msg__, dst__, src__) \
3490 msg__ = (CsrWifiSmeSmeCommonConfigGetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeSmeCommonConfigGetReq)); \
3491 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SME_COMMON_CONFIG_GET_REQ, dst__, src__);
3493 #define CsrWifiSmeSmeCommonConfigGetReqSendTo(dst__, src__) \
3495 CsrWifiSmeSmeCommonConfigGetReq *msg__; \
3496 CsrWifiSmeSmeCommonConfigGetReqCreate(msg__, dst__, src__); \
3497 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
3500 #define CsrWifiSmeSmeCommonConfigGetReqSend(src__) \
3501 CsrWifiSmeSmeCommonConfigGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
3503 /*******************************************************************************
3506 CsrWifiSmeSmeCommonConfigGetCfmSend
3509 This primitive reports the result of the request.
3512 queue - Destination Task Queue
3513 status - Reports the result of the request
3514 deviceConfig - Configuration options in the SME
3516 *******************************************************************************/
3517 #define CsrWifiSmeSmeCommonConfigGetCfmCreate(msg__, dst__, src__, status__, deviceConfig__) \
3518 msg__ = (CsrWifiSmeSmeCommonConfigGetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeSmeCommonConfigGetCfm)); \
3519 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SME_COMMON_CONFIG_GET_CFM, dst__, src__); \
3520 msg__->status = (status__); \
3521 msg__->deviceConfig = (deviceConfig__);
3523 #define CsrWifiSmeSmeCommonConfigGetCfmSendTo(dst__, src__, status__, deviceConfig__) \
3525 CsrWifiSmeSmeCommonConfigGetCfm *msg__; \
3526 CsrWifiSmeSmeCommonConfigGetCfmCreate(msg__, dst__, src__, status__, deviceConfig__); \
3527 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3530 #define CsrWifiSmeSmeCommonConfigGetCfmSend(dst__, status__, deviceConfig__) \
3531 CsrWifiSmeSmeCommonConfigGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, deviceConfig__)
3533 /*******************************************************************************
3536 CsrWifiSmeSmeCommonConfigSetReqSend
3539 This primitive sets the value of the Sme common.
3542 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3543 deviceConfig - Configuration options in the SME
3545 *******************************************************************************/
3546 #define CsrWifiSmeSmeCommonConfigSetReqCreate(msg__, dst__, src__, deviceConfig__) \
3547 msg__ = (CsrWifiSmeSmeCommonConfigSetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeSmeCommonConfigSetReq)); \
3548 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SME_COMMON_CONFIG_SET_REQ, dst__, src__); \
3549 msg__->deviceConfig = (deviceConfig__);
3551 #define CsrWifiSmeSmeCommonConfigSetReqSendTo(dst__, src__, deviceConfig__) \
3553 CsrWifiSmeSmeCommonConfigSetReq *msg__; \
3554 CsrWifiSmeSmeCommonConfigSetReqCreate(msg__, dst__, src__, deviceConfig__); \
3555 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
3558 #define CsrWifiSmeSmeCommonConfigSetReqSend(src__, deviceConfig__) \
3559 CsrWifiSmeSmeCommonConfigSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, deviceConfig__)
3561 /*******************************************************************************
3564 CsrWifiSmeSmeCommonConfigSetCfmSend
3567 Reports the result of the request
3570 queue - Destination Task Queue
3571 status - Reports the result of the request
3573 *******************************************************************************/
3574 #define CsrWifiSmeSmeCommonConfigSetCfmCreate(msg__, dst__, src__, status__) \
3575 msg__ = (CsrWifiSmeSmeCommonConfigSetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeSmeCommonConfigSetCfm)); \
3576 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SME_COMMON_CONFIG_SET_CFM, dst__, src__); \
3577 msg__->status = (status__);
3579 #define CsrWifiSmeSmeCommonConfigSetCfmSendTo(dst__, src__, status__) \
3581 CsrWifiSmeSmeCommonConfigSetCfm *msg__; \
3582 CsrWifiSmeSmeCommonConfigSetCfmCreate(msg__, dst__, src__, status__); \
3583 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3586 #define CsrWifiSmeSmeCommonConfigSetCfmSend(dst__, status__) \
3587 CsrWifiSmeSmeCommonConfigSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
3589 /*******************************************************************************
3592 CsrWifiSmeSmeStaConfigGetReqSend
3595 This primitive gets the value of the SmeStaConfig parameter.
3598 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3599 interfaceTag - Interface Identifier; unique identifier of an interface
3601 *******************************************************************************/
3602 #define CsrWifiSmeSmeStaConfigGetReqCreate(msg__, dst__, src__, interfaceTag__) \
3603 msg__ = (CsrWifiSmeSmeStaConfigGetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeSmeStaConfigGetReq)); \
3604 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SME_STA_CONFIG_GET_REQ, dst__, src__); \
3605 msg__->interfaceTag = (interfaceTag__);
3607 #define CsrWifiSmeSmeStaConfigGetReqSendTo(dst__, src__, interfaceTag__) \
3609 CsrWifiSmeSmeStaConfigGetReq *msg__; \
3610 CsrWifiSmeSmeStaConfigGetReqCreate(msg__, dst__, src__, interfaceTag__); \
3611 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
3614 #define CsrWifiSmeSmeStaConfigGetReqSend(src__, interfaceTag__) \
3615 CsrWifiSmeSmeStaConfigGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__)
3617 /*******************************************************************************
3620 CsrWifiSmeSmeStaConfigGetCfmSend
3623 This primitive reports the result of the request.
3626 queue - Destination Task Queue
3627 interfaceTag - Interface Identifier; unique identifier of an interface
3628 status - Reports the result of the request
3629 smeConfig - Current SME Station Parameters
3631 *******************************************************************************/
3632 #define CsrWifiSmeSmeStaConfigGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, smeConfig__) \
3633 msg__ = (CsrWifiSmeSmeStaConfigGetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeSmeStaConfigGetCfm)); \
3634 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SME_STA_CONFIG_GET_CFM, dst__, src__); \
3635 msg__->interfaceTag = (interfaceTag__); \
3636 msg__->status = (status__); \
3637 msg__->smeConfig = (smeConfig__);
3639 #define CsrWifiSmeSmeStaConfigGetCfmSendTo(dst__, src__, interfaceTag__, status__, smeConfig__) \
3641 CsrWifiSmeSmeStaConfigGetCfm *msg__; \
3642 CsrWifiSmeSmeStaConfigGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, smeConfig__); \
3643 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3646 #define CsrWifiSmeSmeStaConfigGetCfmSend(dst__, interfaceTag__, status__, smeConfig__) \
3647 CsrWifiSmeSmeStaConfigGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, smeConfig__)
3649 /*******************************************************************************
3652 CsrWifiSmeSmeStaConfigSetReqSend
3655 This primitive sets the value of the SmeConfig parameter.
3658 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3659 interfaceTag - Interface Identifier; unique identifier of an interface
3660 smeConfig - SME Station Parameters to be set
3662 *******************************************************************************/
3663 #define CsrWifiSmeSmeStaConfigSetReqCreate(msg__, dst__, src__, interfaceTag__, smeConfig__) \
3664 msg__ = (CsrWifiSmeSmeStaConfigSetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeSmeStaConfigSetReq)); \
3665 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SME_STA_CONFIG_SET_REQ, dst__, src__); \
3666 msg__->interfaceTag = (interfaceTag__); \
3667 msg__->smeConfig = (smeConfig__);
3669 #define CsrWifiSmeSmeStaConfigSetReqSendTo(dst__, src__, interfaceTag__, smeConfig__) \
3671 CsrWifiSmeSmeStaConfigSetReq *msg__; \
3672 CsrWifiSmeSmeStaConfigSetReqCreate(msg__, dst__, src__, interfaceTag__, smeConfig__); \
3673 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
3676 #define CsrWifiSmeSmeStaConfigSetReqSend(src__, interfaceTag__, smeConfig__) \
3677 CsrWifiSmeSmeStaConfigSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__, smeConfig__)
3679 /*******************************************************************************
3682 CsrWifiSmeSmeStaConfigSetCfmSend
3685 This primitive reports the result of the request.
3688 queue - Destination Task Queue
3689 interfaceTag - Interface Identifier; unique identifier of an interface
3690 status - Reports the result of the request
3692 *******************************************************************************/
3693 #define CsrWifiSmeSmeStaConfigSetCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
3694 msg__ = (CsrWifiSmeSmeStaConfigSetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeSmeStaConfigSetCfm)); \
3695 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SME_STA_CONFIG_SET_CFM, dst__, src__); \
3696 msg__->interfaceTag = (interfaceTag__); \
3697 msg__->status = (status__);
3699 #define CsrWifiSmeSmeStaConfigSetCfmSendTo(dst__, src__, interfaceTag__, status__) \
3701 CsrWifiSmeSmeStaConfigSetCfm *msg__; \
3702 CsrWifiSmeSmeStaConfigSetCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
3703 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3706 #define CsrWifiSmeSmeStaConfigSetCfmSend(dst__, interfaceTag__, status__) \
3707 CsrWifiSmeSmeStaConfigSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
3709 /*******************************************************************************
3712 CsrWifiSmeStationMacAddressGetReqSend
3715 This primitives is used to retrieve the current MAC address used by the
3719 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3721 *******************************************************************************/
3722 #define CsrWifiSmeStationMacAddressGetReqCreate(msg__, dst__, src__) \
3723 msg__ = (CsrWifiSmeStationMacAddressGetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeStationMacAddressGetReq)); \
3724 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_STATION_MAC_ADDRESS_GET_REQ, dst__, src__);
3726 #define CsrWifiSmeStationMacAddressGetReqSendTo(dst__, src__) \
3728 CsrWifiSmeStationMacAddressGetReq *msg__; \
3729 CsrWifiSmeStationMacAddressGetReqCreate(msg__, dst__, src__); \
3730 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
3733 #define CsrWifiSmeStationMacAddressGetReqSend(src__) \
3734 CsrWifiSmeStationMacAddressGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
3736 /*******************************************************************************
3739 CsrWifiSmeStationMacAddressGetCfmSend
3742 This primitive reports the result of the request.
3745 queue - Destination Task Queue
3746 status - Reports the result of the request
3747 stationMacAddress - Current MAC address of the station.
3749 *******************************************************************************/
3750 #define CsrWifiSmeStationMacAddressGetCfmCreate(msg__, dst__, src__, status__, stationMacAddress__) \
3751 msg__ = (CsrWifiSmeStationMacAddressGetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeStationMacAddressGetCfm)); \
3752 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_STATION_MAC_ADDRESS_GET_CFM, dst__, src__); \
3753 msg__->status = (status__); \
3754 memcpy(msg__->stationMacAddress, (stationMacAddress__), sizeof(CsrWifiMacAddress) * 2);
3756 #define CsrWifiSmeStationMacAddressGetCfmSendTo(dst__, src__, status__, stationMacAddress__) \
3758 CsrWifiSmeStationMacAddressGetCfm *msg__; \
3759 CsrWifiSmeStationMacAddressGetCfmCreate(msg__, dst__, src__, status__, stationMacAddress__); \
3760 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3763 #define CsrWifiSmeStationMacAddressGetCfmSend(dst__, status__, stationMacAddress__) \
3764 CsrWifiSmeStationMacAddressGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, stationMacAddress__)
3766 /*******************************************************************************
3769 CsrWifiSmeTspecReqSend
3772 The wireless manager application should call this primitive to use the
3774 The chip supports the use of TSPECs and TCLAS for the use of IEEE
3775 802.11/WMM Quality of Service features.
3776 The API allows the wireless manager application to supply a correctly
3777 formatted TSPEC and TCLAS pair to the driver.
3778 After performing basic validation, the driver negotiates the installation
3779 of the TSPEC with the AP as defined by the 802.11 specification.
3780 The driver retains all TSPEC and TCLAS pairs until they are specifically
3782 It is not compulsory for a TSPEC to have a TCLAS (NULL is used to
3783 indicate that no TCLAS is supplied), while a TCLASS always require a
3785 The format of the TSPEC element is specified in 'WMM (including WMM Power
3786 Save) Specification - Version 1.1' and 'ANSI/IEEE Std 802.11-REVmb/D3.0'.
3787 For more information, see 'UniFi Configuring WMM and WMM-PS'.
3790 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3791 interfaceTag - Interface Identifier; unique identifier of an interface
3792 action - Specifies the action to be carried out on the list of TSPECs.
3793 CSR_WIFI_SME_LIST_ACTION_FLUSH is not applicable here.
3794 transactionId - Unique Transaction ID for the TSPEC, as assigned by the
3796 strict - If it set to false, allows the SME to perform automatic
3798 ctrlMask - Additional TSPEC configuration for CCX.
3799 Set mask with values from CsrWifiSmeTspecCtrl.
3800 CURRENTLY NOT SUPPORTED
3801 tspecLength - Length of the TSPEC.
3802 tspec - Points to the first byte of the TSPEC
3803 tclasLength - Length of the TCLAS.
3804 If it is equal to 0, no TCLASS is provided for the TSPEC
3805 tclas - Points to the first byte of the TCLAS, if any.
3807 *******************************************************************************/
3808 #define CsrWifiSmeTspecReqCreate(msg__, dst__, src__, interfaceTag__, action__, transactionId__, strict__, ctrlMask__, tspecLength__, tspec__, tclasLength__, tclas__) \
3809 msg__ = (CsrWifiSmeTspecReq *) CsrPmemAlloc(sizeof(CsrWifiSmeTspecReq)); \
3810 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_TSPEC_REQ, dst__, src__); \
3811 msg__->interfaceTag = (interfaceTag__); \
3812 msg__->action = (action__); \
3813 msg__->transactionId = (transactionId__); \
3814 msg__->strict = (strict__); \
3815 msg__->ctrlMask = (ctrlMask__); \
3816 msg__->tspecLength = (tspecLength__); \
3817 msg__->tspec = (tspec__); \
3818 msg__->tclasLength = (tclasLength__); \
3819 msg__->tclas = (tclas__);
3821 #define CsrWifiSmeTspecReqSendTo(dst__, src__, interfaceTag__, action__, transactionId__, strict__, ctrlMask__, tspecLength__, tspec__, tclasLength__, tclas__) \
3823 CsrWifiSmeTspecReq *msg__; \
3824 CsrWifiSmeTspecReqCreate(msg__, dst__, src__, interfaceTag__, action__, transactionId__, strict__, ctrlMask__, tspecLength__, tspec__, tclasLength__, tclas__); \
3825 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
3828 #define CsrWifiSmeTspecReqSend(src__, interfaceTag__, action__, transactionId__, strict__, ctrlMask__, tspecLength__, tspec__, tclasLength__, tclas__) \
3829 CsrWifiSmeTspecReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__, action__, transactionId__, strict__, ctrlMask__, tspecLength__, tspec__, tclasLength__, tclas__)
3831 /*******************************************************************************
3834 CsrWifiSmeTspecIndSend
3837 The SME will send this primitive to all the task that have registered to
3838 receive it when a status change in the TSPEC occurs.
3841 queue - Destination Task Queue
3842 interfaceTag - Interface Identifier; unique identifier of an interface
3843 transactionId - Unique Transaction ID for the TSPEC, as assigned by the
3845 tspecResultCode - Specifies the TSPEC operation requested by the peer
3847 tspecLength - Length of the TSPEC.
3848 tspec - Points to the first byte of the TSPEC
3850 *******************************************************************************/
3851 #define CsrWifiSmeTspecIndCreate(msg__, dst__, src__, interfaceTag__, transactionId__, tspecResultCode__, tspecLength__, tspec__) \
3852 msg__ = (CsrWifiSmeTspecInd *) CsrPmemAlloc(sizeof(CsrWifiSmeTspecInd)); \
3853 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_TSPEC_IND, dst__, src__); \
3854 msg__->interfaceTag = (interfaceTag__); \
3855 msg__->transactionId = (transactionId__); \
3856 msg__->tspecResultCode = (tspecResultCode__); \
3857 msg__->tspecLength = (tspecLength__); \
3858 msg__->tspec = (tspec__);
3860 #define CsrWifiSmeTspecIndSendTo(dst__, src__, interfaceTag__, transactionId__, tspecResultCode__, tspecLength__, tspec__) \
3862 CsrWifiSmeTspecInd *msg__; \
3863 CsrWifiSmeTspecIndCreate(msg__, dst__, src__, interfaceTag__, transactionId__, tspecResultCode__, tspecLength__, tspec__); \
3864 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3867 #define CsrWifiSmeTspecIndSend(dst__, interfaceTag__, transactionId__, tspecResultCode__, tspecLength__, tspec__) \
3868 CsrWifiSmeTspecIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, transactionId__, tspecResultCode__, tspecLength__, tspec__)
3870 /*******************************************************************************
3873 CsrWifiSmeTspecCfmSend
3876 The SME calls the primitive to report the result of the TSpec primitive
3880 queue - Destination Task Queue
3881 interfaceTag - Interface Identifier; unique identifier of an interface
3882 status - Reports the result of the request
3883 transactionId - Unique Transaction ID for the TSPEC, as assigned by the
3885 tspecResultCode - Specifies the result of the negotiated TSPEC operation
3886 tspecLength - Length of the TSPEC.
3887 tspec - Points to the first byte of the TSPEC
3889 *******************************************************************************/
3890 #define CsrWifiSmeTspecCfmCreate(msg__, dst__, src__, interfaceTag__, status__, transactionId__, tspecResultCode__, tspecLength__, tspec__) \
3891 msg__ = (CsrWifiSmeTspecCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeTspecCfm)); \
3892 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_TSPEC_CFM, dst__, src__); \
3893 msg__->interfaceTag = (interfaceTag__); \
3894 msg__->status = (status__); \
3895 msg__->transactionId = (transactionId__); \
3896 msg__->tspecResultCode = (tspecResultCode__); \
3897 msg__->tspecLength = (tspecLength__); \
3898 msg__->tspec = (tspec__);
3900 #define CsrWifiSmeTspecCfmSendTo(dst__, src__, interfaceTag__, status__, transactionId__, tspecResultCode__, tspecLength__, tspec__) \
3902 CsrWifiSmeTspecCfm *msg__; \
3903 CsrWifiSmeTspecCfmCreate(msg__, dst__, src__, interfaceTag__, status__, transactionId__, tspecResultCode__, tspecLength__, tspec__); \
3904 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3907 #define CsrWifiSmeTspecCfmSend(dst__, interfaceTag__, status__, transactionId__, tspecResultCode__, tspecLength__, tspec__) \
3908 CsrWifiSmeTspecCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, transactionId__, tspecResultCode__, tspecLength__, tspec__)
3910 /*******************************************************************************
3913 CsrWifiSmeVersionsGetReqSend
3916 This primitive gets the value of the Versions parameter.
3919 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3921 *******************************************************************************/
3922 #define CsrWifiSmeVersionsGetReqCreate(msg__, dst__, src__) \
3923 msg__ = (CsrWifiSmeVersionsGetReq *) CsrPmemAlloc(sizeof(CsrWifiSmeVersionsGetReq)); \
3924 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_VERSIONS_GET_REQ, dst__, src__);
3926 #define CsrWifiSmeVersionsGetReqSendTo(dst__, src__) \
3928 CsrWifiSmeVersionsGetReq *msg__; \
3929 CsrWifiSmeVersionsGetReqCreate(msg__, dst__, src__); \
3930 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
3933 #define CsrWifiSmeVersionsGetReqSend(src__) \
3934 CsrWifiSmeVersionsGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
3936 /*******************************************************************************
3939 CsrWifiSmeVersionsGetCfmSend
3942 This primitive reports the result of the request.
3945 queue - Destination Task Queue
3946 status - Reports the result of the request
3947 versions - Version IDs of the product
3949 *******************************************************************************/
3950 #define CsrWifiSmeVersionsGetCfmCreate(msg__, dst__, src__, status__, versions__) \
3951 msg__ = (CsrWifiSmeVersionsGetCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeVersionsGetCfm)); \
3952 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_VERSIONS_GET_CFM, dst__, src__); \
3953 msg__->status = (status__); \
3954 msg__->versions = (versions__);
3956 #define CsrWifiSmeVersionsGetCfmSendTo(dst__, src__, status__, versions__) \
3958 CsrWifiSmeVersionsGetCfm *msg__; \
3959 CsrWifiSmeVersionsGetCfmCreate(msg__, dst__, src__, status__, versions__); \
3960 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3963 #define CsrWifiSmeVersionsGetCfmSend(dst__, status__, versions__) \
3964 CsrWifiSmeVersionsGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, versions__)
3966 /*******************************************************************************
3969 CsrWifiSmeWifiFlightmodeReqSend
3972 The wireless manager application may call this primitive on boot-up of
3973 the platform to ensure that the chip is placed in a mode that prevents
3974 any emission of RF energy.
3975 This primitive is an alternative to CSR_WIFI_SME_WIFI_ON_REQ.
3976 As in CSR_WIFI_SME_WIFI_ON_REQ, it causes the download of the patch file
3977 (if any) and the programming of the initial MIB settings (if supplied by
3978 the WMA), but it also ensures that the chip is left in its lowest
3979 possible power-mode with the radio subsystems disabled.
3980 This feature is useful on platforms where power cannot be removed from
3981 the chip (leaving the chip not initialised will cause it to consume more
3982 power so calling this function ensures that the chip is initialised into
3983 a low power mode but without entering a state where it could emit any RF
3985 NOTE: this primitive does not cause the Wi-Fi to change state: Wi-Fi
3986 stays conceptually off. Configuration primitives can be sent after
3987 CSR_WIFI_SME_WIFI_FLIGHTMODE_REQ and the configuration will be maintained.
3988 Requests that require the state of the Wi-Fi to be ON will return
3989 CSR_WIFI_SME_STATUS_WIFI_OFF in their confirms.
3992 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3993 address - Optionally specifies a station MAC address.
3994 In normal use, the manager should set the address to 0xFF
3995 0xFF 0xFF 0xFF 0xFF 0xFF, which will cause the chip to use
3996 the MAC address in the MIB.
3997 mibFilesCount - Number of provided data blocks with initial MIB values
3998 mibFiles - Points to the first data block with initial MIB values.
3999 These data blocks are typically the contents of the provided
4000 files ufmib.dat and localmib.dat, available from the host
4001 file system, if they exist.
4002 These files typically contain radio tuning and calibration
4004 More values can be created using the Host Tools.
4006 *******************************************************************************/
4007 #define CsrWifiSmeWifiFlightmodeReqCreate(msg__, dst__, src__, address__, mibFilesCount__, mibFiles__) \
4008 msg__ = (CsrWifiSmeWifiFlightmodeReq *) CsrPmemAlloc(sizeof(CsrWifiSmeWifiFlightmodeReq)); \
4009 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_WIFI_FLIGHTMODE_REQ, dst__, src__); \
4010 msg__->address = (address__); \
4011 msg__->mibFilesCount = (mibFilesCount__); \
4012 msg__->mibFiles = (mibFiles__);
4014 #define CsrWifiSmeWifiFlightmodeReqSendTo(dst__, src__, address__, mibFilesCount__, mibFiles__) \
4016 CsrWifiSmeWifiFlightmodeReq *msg__; \
4017 CsrWifiSmeWifiFlightmodeReqCreate(msg__, dst__, src__, address__, mibFilesCount__, mibFiles__); \
4018 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
4021 #define CsrWifiSmeWifiFlightmodeReqSend(src__, address__, mibFilesCount__, mibFiles__) \
4022 CsrWifiSmeWifiFlightmodeReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, address__, mibFilesCount__, mibFiles__)
4024 /*******************************************************************************
4027 CsrWifiSmeWifiFlightmodeCfmSend
4030 The SME calls this primitive when the chip is initialised for low power
4031 mode and with the radio subsystem disabled. To leave flight mode, and
4032 enable Wi-Fi, the wireless manager application should call
4033 CSR_WIFI_SME_WIFI_ON_REQ.
4036 queue - Destination Task Queue
4037 status - Reports the result of the request
4039 *******************************************************************************/
4040 #define CsrWifiSmeWifiFlightmodeCfmCreate(msg__, dst__, src__, status__) \
4041 msg__ = (CsrWifiSmeWifiFlightmodeCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeWifiFlightmodeCfm)); \
4042 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_WIFI_FLIGHTMODE_CFM, dst__, src__); \
4043 msg__->status = (status__);
4045 #define CsrWifiSmeWifiFlightmodeCfmSendTo(dst__, src__, status__) \
4047 CsrWifiSmeWifiFlightmodeCfm *msg__; \
4048 CsrWifiSmeWifiFlightmodeCfmCreate(msg__, dst__, src__, status__); \
4049 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
4052 #define CsrWifiSmeWifiFlightmodeCfmSend(dst__, status__) \
4053 CsrWifiSmeWifiFlightmodeCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
4055 /*******************************************************************************
4058 CsrWifiSmeWifiOffReqSend
4061 The wireless manager application calls this primitive to turn off the
4062 chip, thus saving power when Wi-Fi is not in use.
4065 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
4067 *******************************************************************************/
4068 #define CsrWifiSmeWifiOffReqCreate(msg__, dst__, src__) \
4069 msg__ = (CsrWifiSmeWifiOffReq *) CsrPmemAlloc(sizeof(CsrWifiSmeWifiOffReq)); \
4070 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_WIFI_OFF_REQ, dst__, src__);
4072 #define CsrWifiSmeWifiOffReqSendTo(dst__, src__) \
4074 CsrWifiSmeWifiOffReq *msg__; \
4075 CsrWifiSmeWifiOffReqCreate(msg__, dst__, src__); \
4076 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
4079 #define CsrWifiSmeWifiOffReqSend(src__) \
4080 CsrWifiSmeWifiOffReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
4082 /*******************************************************************************
4085 CsrWifiSmeWifiOffIndSend
4088 The SME sends this primitive to all the tasks that have registered to
4089 receive it to report that the chip has been turned off.
4092 queue - Destination Task Queue
4093 reason - Indicates the reason why the Wi-Fi has been switched off.
4095 *******************************************************************************/
4096 #define CsrWifiSmeWifiOffIndCreate(msg__, dst__, src__, reason__) \
4097 msg__ = (CsrWifiSmeWifiOffInd *) CsrPmemAlloc(sizeof(CsrWifiSmeWifiOffInd)); \
4098 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_WIFI_OFF_IND, dst__, src__); \
4099 msg__->reason = (reason__);
4101 #define CsrWifiSmeWifiOffIndSendTo(dst__, src__, reason__) \
4103 CsrWifiSmeWifiOffInd *msg__; \
4104 CsrWifiSmeWifiOffIndCreate(msg__, dst__, src__, reason__); \
4105 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
4108 #define CsrWifiSmeWifiOffIndSend(dst__, reason__) \
4109 CsrWifiSmeWifiOffIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, reason__)
4111 /*******************************************************************************
4114 CsrWifiSmeWifiOffCfmSend
4117 After receiving CSR_WIFI_SME_WIFI_OFF_REQ, if the chip is connected to a
4118 network, the SME will perform a disconnect operation, will send a
4119 CSR_WIFI_SME_MEDIA_STATUS_IND with
4120 CSR_WIFI_SME_MEDIA_STATUS_DISCONNECTED, and then will call
4121 CSR_WIFI_SME_WIFI_OFF_CFM when the chip is off.
4124 queue - Destination Task Queue
4125 status - Reports the result of the request
4127 *******************************************************************************/
4128 #define CsrWifiSmeWifiOffCfmCreate(msg__, dst__, src__, status__) \
4129 msg__ = (CsrWifiSmeWifiOffCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeWifiOffCfm)); \
4130 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_WIFI_OFF_CFM, dst__, src__); \
4131 msg__->status = (status__);
4133 #define CsrWifiSmeWifiOffCfmSendTo(dst__, src__, status__) \
4135 CsrWifiSmeWifiOffCfm *msg__; \
4136 CsrWifiSmeWifiOffCfmCreate(msg__, dst__, src__, status__); \
4137 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
4140 #define CsrWifiSmeWifiOffCfmSend(dst__, status__) \
4141 CsrWifiSmeWifiOffCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
4143 /*******************************************************************************
4146 CsrWifiSmeWifiOnReqSend
4149 The wireless manager application calls this primitive to turn on the
4151 If the Wi-Fi chip is currently off, the SME turns the Wi-Fi chip on,
4152 downloads the patch file (if any), and programs the initial MIB settings
4153 (if supplied by the WMA).
4154 The patch file is not provided with the SME API; its downloading is
4155 automatic and handled internally by the system.
4156 The MIB settings, when provided, override the default values that the
4157 firmware loads from EEPROM.
4158 If the Wi-Fi chip is already on, the SME takes no action and returns a
4159 successful status in the confirm.
4162 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
4163 address - Optionally specifies a station MAC address.
4164 In normal use, the manager should set the address to 0xFF
4165 0xFF 0xFF 0xFF 0xFF 0xFF, which will cause the chip to use
4166 the MAC address in the MIB
4167 mibFilesCount - Number of provided data blocks with initial MIB values
4168 mibFiles - Points to the first data block with initial MIB values.
4169 These data blocks are typically the contents of the provided
4170 files ufmib.dat and localmib.dat, available from the host
4171 file system, if they exist.
4172 These files typically contain radio tuning and calibration
4174 More values can be created using the Host Tools.
4176 *******************************************************************************/
4177 #define CsrWifiSmeWifiOnReqCreate(msg__, dst__, src__, address__, mibFilesCount__, mibFiles__) \
4178 msg__ = (CsrWifiSmeWifiOnReq *) CsrPmemAlloc(sizeof(CsrWifiSmeWifiOnReq)); \
4179 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_WIFI_ON_REQ, dst__, src__); \
4180 msg__->address = (address__); \
4181 msg__->mibFilesCount = (mibFilesCount__); \
4182 msg__->mibFiles = (mibFiles__);
4184 #define CsrWifiSmeWifiOnReqSendTo(dst__, src__, address__, mibFilesCount__, mibFiles__) \
4186 CsrWifiSmeWifiOnReq *msg__; \
4187 CsrWifiSmeWifiOnReqCreate(msg__, dst__, src__, address__, mibFilesCount__, mibFiles__); \
4188 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
4191 #define CsrWifiSmeWifiOnReqSend(src__, address__, mibFilesCount__, mibFiles__) \
4192 CsrWifiSmeWifiOnReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, address__, mibFilesCount__, mibFiles__)
4194 /*******************************************************************************
4197 CsrWifiSmeWifiOnIndSend
4200 The SME sends this primitive to all tasks that have registered to receive
4201 it once the chip becomes available and ready to use.
4204 queue - Destination Task Queue
4205 address - Current MAC address
4207 *******************************************************************************/
4208 #define CsrWifiSmeWifiOnIndCreate(msg__, dst__, src__, address__) \
4209 msg__ = (CsrWifiSmeWifiOnInd *) CsrPmemAlloc(sizeof(CsrWifiSmeWifiOnInd)); \
4210 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_WIFI_ON_IND, dst__, src__); \
4211 msg__->address = (address__);
4213 #define CsrWifiSmeWifiOnIndSendTo(dst__, src__, address__) \
4215 CsrWifiSmeWifiOnInd *msg__; \
4216 CsrWifiSmeWifiOnIndCreate(msg__, dst__, src__, address__); \
4217 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
4220 #define CsrWifiSmeWifiOnIndSend(dst__, address__) \
4221 CsrWifiSmeWifiOnIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, address__)
4223 /*******************************************************************************
4226 CsrWifiSmeWifiOnCfmSend
4229 The SME sends this primitive to the task that has sent the request once
4230 the chip has been initialised and is available for use.
4233 queue - Destination Task Queue
4234 status - Reports the result of the request
4236 *******************************************************************************/
4237 #define CsrWifiSmeWifiOnCfmCreate(msg__, dst__, src__, status__) \
4238 msg__ = (CsrWifiSmeWifiOnCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeWifiOnCfm)); \
4239 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_WIFI_ON_CFM, dst__, src__); \
4240 msg__->status = (status__);
4242 #define CsrWifiSmeWifiOnCfmSendTo(dst__, src__, status__) \
4244 CsrWifiSmeWifiOnCfm *msg__; \
4245 CsrWifiSmeWifiOnCfmCreate(msg__, dst__, src__, status__); \
4246 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
4249 #define CsrWifiSmeWifiOnCfmSend(dst__, status__) \
4250 CsrWifiSmeWifiOnCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
4252 /*******************************************************************************
4255 CsrWifiSmeWpsConfigurationReqSend
4258 This primitive passes the WPS information for the device to SME. This may
4259 be accepted only if no interface is active.
4262 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
4263 wpsConfig - WPS config.
4265 *******************************************************************************/
4266 #define CsrWifiSmeWpsConfigurationReqCreate(msg__, dst__, src__, wpsConfig__) \
4267 msg__ = (CsrWifiSmeWpsConfigurationReq *) CsrPmemAlloc(sizeof(CsrWifiSmeWpsConfigurationReq)); \
4268 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_WPS_CONFIGURATION_REQ, dst__, src__); \
4269 msg__->wpsConfig = (wpsConfig__);
4271 #define CsrWifiSmeWpsConfigurationReqSendTo(dst__, src__, wpsConfig__) \
4273 CsrWifiSmeWpsConfigurationReq *msg__; \
4274 CsrWifiSmeWpsConfigurationReqCreate(msg__, dst__, src__, wpsConfig__); \
4275 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
4278 #define CsrWifiSmeWpsConfigurationReqSend(src__, wpsConfig__) \
4279 CsrWifiSmeWpsConfigurationReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, wpsConfig__)
4281 /*******************************************************************************
4284 CsrWifiSmeWpsConfigurationCfmSend
4290 queue - Destination Task Queue
4291 status - Status of the request.
4293 *******************************************************************************/
4294 #define CsrWifiSmeWpsConfigurationCfmCreate(msg__, dst__, src__, status__) \
4295 msg__ = (CsrWifiSmeWpsConfigurationCfm *) CsrPmemAlloc(sizeof(CsrWifiSmeWpsConfigurationCfm)); \
4296 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_WPS_CONFIGURATION_CFM, dst__, src__); \
4297 msg__->status = (status__);
4299 #define CsrWifiSmeWpsConfigurationCfmSendTo(dst__, src__, status__) \
4301 CsrWifiSmeWpsConfigurationCfm *msg__; \
4302 CsrWifiSmeWpsConfigurationCfmCreate(msg__, dst__, src__, status__); \
4303 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
4306 #define CsrWifiSmeWpsConfigurationCfmSend(dst__, status__) \
4307 CsrWifiSmeWpsConfigurationCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
4314 #endif /* CSR_WIFI_SME_LIB_H__ */