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__
16 #include "csr_sched.h"
17 #include "csr_macro.h"
18 #include "csr_msg_transport.h"
20 #include "csr_wifi_lib.h"
22 #include "csr_wifi_sme_prim.h"
23 #include "csr_wifi_sme_task.h"
26 #ifndef CSR_WIFI_SME_LIB_DESTINATION_QUEUE
27 # ifdef CSR_WIFI_NME_ENABLE
28 # include "csr_wifi_nme_task.h"
29 # define CSR_WIFI_SME_LIB_DESTINATION_QUEUE CSR_WIFI_NME_IFACEQUEUE
31 # define CSR_WIFI_SME_LIB_DESTINATION_QUEUE CSR_WIFI_SME_IFACEQUEUE
40 /*----------------------------------------------------------------------------*
41 * CsrWifiSmeFreeUpstreamMessageContents
44 * Free the allocated memory in a CSR_WIFI_SME upstream message. Does not
45 * free the message itself, and can only be used for upstream messages.
48 * Deallocates the resources in a CSR_WIFI_SME upstream message
49 *----------------------------------------------------------------------------*/
50 void CsrWifiSmeFreeUpstreamMessageContents(u16 eventClass, void *message);
52 /*----------------------------------------------------------------------------*
53 * CsrWifiSmeFreeDownstreamMessageContents
56 * Free the allocated memory in a CSR_WIFI_SME downstream message. Does not
57 * free the message itself, and can only be used for downstream messages.
60 * Deallocates the resources in a CSR_WIFI_SME downstream message
61 *----------------------------------------------------------------------------*/
62 void CsrWifiSmeFreeDownstreamMessageContents(u16 eventClass, void *message);
64 /*----------------------------------------------------------------------------*
65 * Enum to string functions
66 *----------------------------------------------------------------------------*/
67 const char* CsrWifiSme80211NetworkTypeToString(CsrWifiSme80211NetworkType value);
68 const char* CsrWifiSme80211PrivacyModeToString(CsrWifiSme80211PrivacyMode value);
69 const char* CsrWifiSme80211dTrustLevelToString(CsrWifiSme80211dTrustLevel value);
70 const char* CsrWifiSmeAmpStatusToString(CsrWifiSmeAmpStatus value);
71 const char* CsrWifiSmeAuthModeToString(CsrWifiSmeAuthMode value);
72 const char* CsrWifiSmeBasicUsabilityToString(CsrWifiSmeBasicUsability value);
73 const char* CsrWifiSmeBssTypeToString(CsrWifiSmeBssType value);
74 const char* CsrWifiSmeCoexSchemeToString(CsrWifiSmeCoexScheme value);
75 const char* CsrWifiSmeControlIndicationToString(CsrWifiSmeControlIndication value);
76 const char* CsrWifiSmeCtsProtectionTypeToString(CsrWifiSmeCtsProtectionType value);
77 const char* CsrWifiSmeD3AutoScanModeToString(CsrWifiSmeD3AutoScanMode value);
78 const char* CsrWifiSmeEncryptionToString(CsrWifiSmeEncryption value);
79 const char* CsrWifiSmeFirmwareDriverInterfaceToString(CsrWifiSmeFirmwareDriverInterface value);
80 const char* CsrWifiSmeHostPowerModeToString(CsrWifiSmeHostPowerMode value);
81 const char* CsrWifiSmeIEEE80211ReasonToString(CsrWifiSmeIEEE80211Reason value);
82 const char* CsrWifiSmeIEEE80211ResultToString(CsrWifiSmeIEEE80211Result value);
83 const char* CsrWifiSmeIndicationsToString(CsrWifiSmeIndications value);
84 const char* CsrWifiSmeKeyTypeToString(CsrWifiSmeKeyType value);
85 const char* CsrWifiSmeListActionToString(CsrWifiSmeListAction value);
86 const char* CsrWifiSmeMediaStatusToString(CsrWifiSmeMediaStatus value);
87 const char* CsrWifiSmeP2pCapabilityToString(CsrWifiSmeP2pCapability value);
88 const char* CsrWifiSmeP2pGroupCapabilityToString(CsrWifiSmeP2pGroupCapability value);
89 const char* CsrWifiSmeP2pNoaConfigMethodToString(CsrWifiSmeP2pNoaConfigMethod value);
90 const char* CsrWifiSmeP2pRoleToString(CsrWifiSmeP2pRole value);
91 const char* CsrWifiSmeP2pStatusToString(CsrWifiSmeP2pStatus value);
92 const char* CsrWifiSmePacketFilterModeToString(CsrWifiSmePacketFilterMode value);
93 const char* CsrWifiSmePowerSaveLevelToString(CsrWifiSmePowerSaveLevel value);
94 const char* CsrWifiSmePreambleTypeToString(CsrWifiSmePreambleType value);
95 const char* CsrWifiSmeRadioIFToString(CsrWifiSmeRadioIF value);
96 const char* CsrWifiSmeRegulatoryDomainToString(CsrWifiSmeRegulatoryDomain value);
97 const char* CsrWifiSmeRoamReasonToString(CsrWifiSmeRoamReason value);
98 const char* CsrWifiSmeScanTypeToString(CsrWifiSmeScanType value);
99 const char* CsrWifiSmeTrafficTypeToString(CsrWifiSmeTrafficType value);
100 const char* CsrWifiSmeTspecCtrlToString(CsrWifiSmeTspecCtrl value);
101 const char* CsrWifiSmeTspecResultCodeToString(CsrWifiSmeTspecResultCode value);
102 const char* CsrWifiSmeWepAuthModeToString(CsrWifiSmeWepAuthMode value);
103 const char* CsrWifiSmeWepCredentialTypeToString(CsrWifiSmeWepCredentialType value);
104 const char* CsrWifiSmeWmmModeToString(CsrWifiSmeWmmMode value);
105 const char* CsrWifiSmeWmmQosInfoToString(CsrWifiSmeWmmQosInfo value);
106 const char* CsrWifiSmeWpsConfigTypeToString(CsrWifiSmeWpsConfigType value);
107 const char* CsrWifiSmeWpsDeviceCategoryToString(CsrWifiSmeWpsDeviceCategory value);
108 const char* CsrWifiSmeWpsDeviceSubCategoryToString(CsrWifiSmeWpsDeviceSubCategory value);
109 const char* CsrWifiSmeWpsDpidToString(CsrWifiSmeWpsDpid value);
110 const char* CsrWifiSmeWpsRegistrationToString(CsrWifiSmeWpsRegistration value);
113 /*----------------------------------------------------------------------------*
114 * CsrPrim Type toString function.
115 * Converts a message type to the String name of the Message
116 *----------------------------------------------------------------------------*/
117 const char* CsrWifiSmePrimTypeToString(CsrPrim msgType);
119 /*----------------------------------------------------------------------------*
120 * Lookup arrays for PrimType name Strings
121 *----------------------------------------------------------------------------*/
122 extern const char *CsrWifiSmeUpstreamPrimNames[CSR_WIFI_SME_PRIM_UPSTREAM_COUNT];
123 extern const char *CsrWifiSmeDownstreamPrimNames[CSR_WIFI_SME_PRIM_DOWNSTREAM_COUNT];
125 /*******************************************************************************
128 CsrWifiSmeActivateReqSend
131 The WMA sends this primitive to activate the SME.
132 The WMA must activate the SME before it can send any other primitive.
135 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
137 *******************************************************************************/
138 #define CsrWifiSmeActivateReqCreate(msg__, dst__, src__) \
139 msg__ = kmalloc(sizeof(CsrWifiSmeActivateReq), GFP_KERNEL); \
140 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ACTIVATE_REQ, dst__, src__);
142 #define CsrWifiSmeActivateReqSendTo(dst__, src__) \
144 CsrWifiSmeActivateReq *msg__; \
145 CsrWifiSmeActivateReqCreate(msg__, dst__, src__); \
146 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
149 #define CsrWifiSmeActivateReqSend(src__) \
150 CsrWifiSmeActivateReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
152 /*******************************************************************************
155 CsrWifiSmeActivateCfmSend
158 The SME sends this primitive when the activation is complete.
161 queue - Destination Task Queue
162 status - Reports the result of the request
164 *******************************************************************************/
165 #define CsrWifiSmeActivateCfmCreate(msg__, dst__, src__, status__) \
166 msg__ = kmalloc(sizeof(CsrWifiSmeActivateCfm), GFP_KERNEL); \
167 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ACTIVATE_CFM, dst__, src__); \
168 msg__->status = (status__);
170 #define CsrWifiSmeActivateCfmSendTo(dst__, src__, status__) \
172 CsrWifiSmeActivateCfm *msg__; \
173 CsrWifiSmeActivateCfmCreate(msg__, dst__, src__, status__); \
174 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
177 #define CsrWifiSmeActivateCfmSend(dst__, status__) \
178 CsrWifiSmeActivateCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
180 /*******************************************************************************
183 CsrWifiSmeAdhocConfigGetReqSend
186 This primitive gets the value of the adHocConfig parameter.
189 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
191 *******************************************************************************/
192 #define CsrWifiSmeAdhocConfigGetReqCreate(msg__, dst__, src__) \
193 msg__ = kmalloc(sizeof(CsrWifiSmeAdhocConfigGetReq), GFP_KERNEL); \
194 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ADHOC_CONFIG_GET_REQ, dst__, src__);
196 #define CsrWifiSmeAdhocConfigGetReqSendTo(dst__, src__) \
198 CsrWifiSmeAdhocConfigGetReq *msg__; \
199 CsrWifiSmeAdhocConfigGetReqCreate(msg__, dst__, src__); \
200 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
203 #define CsrWifiSmeAdhocConfigGetReqSend(src__) \
204 CsrWifiSmeAdhocConfigGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
206 /*******************************************************************************
209 CsrWifiSmeAdhocConfigGetCfmSend
212 This primitive reports the result of the request.
215 queue - Destination Task Queue
216 status - Reports the result of the request
217 adHocConfig - Contains the values used when starting an Ad-hoc (IBSS)
220 *******************************************************************************/
221 #define CsrWifiSmeAdhocConfigGetCfmCreate(msg__, dst__, src__, status__, adHocConfig__) \
222 msg__ = kmalloc(sizeof(CsrWifiSmeAdhocConfigGetCfm), GFP_KERNEL); \
223 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ADHOC_CONFIG_GET_CFM, dst__, src__); \
224 msg__->status = (status__); \
225 msg__->adHocConfig = (adHocConfig__);
227 #define CsrWifiSmeAdhocConfigGetCfmSendTo(dst__, src__, status__, adHocConfig__) \
229 CsrWifiSmeAdhocConfigGetCfm *msg__; \
230 CsrWifiSmeAdhocConfigGetCfmCreate(msg__, dst__, src__, status__, adHocConfig__); \
231 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
234 #define CsrWifiSmeAdhocConfigGetCfmSend(dst__, status__, adHocConfig__) \
235 CsrWifiSmeAdhocConfigGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, adHocConfig__)
237 /*******************************************************************************
240 CsrWifiSmeAdhocConfigSetReqSend
243 This primitive sets the value of the adHocConfig parameter.
246 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
247 adHocConfig - Sets the values to use when starting an ad hoc network.
249 *******************************************************************************/
250 #define CsrWifiSmeAdhocConfigSetReqCreate(msg__, dst__, src__, adHocConfig__) \
251 msg__ = kmalloc(sizeof(CsrWifiSmeAdhocConfigSetReq), GFP_KERNEL); \
252 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ADHOC_CONFIG_SET_REQ, dst__, src__); \
253 msg__->adHocConfig = (adHocConfig__);
255 #define CsrWifiSmeAdhocConfigSetReqSendTo(dst__, src__, adHocConfig__) \
257 CsrWifiSmeAdhocConfigSetReq *msg__; \
258 CsrWifiSmeAdhocConfigSetReqCreate(msg__, dst__, src__, adHocConfig__); \
259 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
262 #define CsrWifiSmeAdhocConfigSetReqSend(src__, adHocConfig__) \
263 CsrWifiSmeAdhocConfigSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, adHocConfig__)
265 /*******************************************************************************
268 CsrWifiSmeAdhocConfigSetCfmSend
271 This primitive reports the result of the request.
274 queue - Destination Task Queue
275 status - Reports the result of the request
277 *******************************************************************************/
278 #define CsrWifiSmeAdhocConfigSetCfmCreate(msg__, dst__, src__, status__) \
279 msg__ = kmalloc(sizeof(CsrWifiSmeAdhocConfigSetCfm), GFP_KERNEL); \
280 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ADHOC_CONFIG_SET_CFM, dst__, src__); \
281 msg__->status = (status__);
283 #define CsrWifiSmeAdhocConfigSetCfmSendTo(dst__, src__, status__) \
285 CsrWifiSmeAdhocConfigSetCfm *msg__; \
286 CsrWifiSmeAdhocConfigSetCfmCreate(msg__, dst__, src__, status__); \
287 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
290 #define CsrWifiSmeAdhocConfigSetCfmSend(dst__, status__) \
291 CsrWifiSmeAdhocConfigSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
293 /*******************************************************************************
296 CsrWifiSmeAmpStatusChangeIndSend
299 Indication of change to AMP activity.
302 queue - Destination Task Queue
303 interfaceTag - Interface on which the AMP activity changed.
304 ampStatus - The new status of AMP activity.Range: {AMP_ACTIVE,
307 *******************************************************************************/
308 #define CsrWifiSmeAmpStatusChangeIndCreate(msg__, dst__, src__, interfaceTag__, ampStatus__) \
309 msg__ = kmalloc(sizeof(CsrWifiSmeAmpStatusChangeInd), GFP_KERNEL); \
310 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_AMP_STATUS_CHANGE_IND, dst__, src__); \
311 msg__->interfaceTag = (interfaceTag__); \
312 msg__->ampStatus = (ampStatus__);
314 #define CsrWifiSmeAmpStatusChangeIndSendTo(dst__, src__, interfaceTag__, ampStatus__) \
316 CsrWifiSmeAmpStatusChangeInd *msg__; \
317 CsrWifiSmeAmpStatusChangeIndCreate(msg__, dst__, src__, interfaceTag__, ampStatus__); \
318 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
321 #define CsrWifiSmeAmpStatusChangeIndSend(dst__, interfaceTag__, ampStatus__) \
322 CsrWifiSmeAmpStatusChangeIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, ampStatus__)
324 /*******************************************************************************
327 CsrWifiSmeAssociationCompleteIndSend
330 The SME will send this primitive to all the tasks that have registered to
331 receive it whenever it completes an attempt to associate with an AP. If
332 the association was successful, status will be set to
333 CSR_WIFI_SME_STATUS_SUCCESS, otherwise status and deauthReason shall be
334 set to appropriate error codes.
337 queue - Destination Task Queue
338 interfaceTag - Interface Identifier; unique identifier of an interface
339 status - Reports the result of the association procedure
340 connectionInfo - This parameter is relevant only if result is
341 CSR_WIFI_SME_STATUS_SUCCESS:
342 it points to the connection information for the new network
343 deauthReason - This parameter is relevant only if result is not
344 CSR_WIFI_SME_STATUS_SUCCESS:
345 if the AP deauthorised the station, it gives the reason of
348 *******************************************************************************/
349 #define CsrWifiSmeAssociationCompleteIndCreate(msg__, dst__, src__, interfaceTag__, status__, connectionInfo__, deauthReason__) \
350 msg__ = kmalloc(sizeof(CsrWifiSmeAssociationCompleteInd), GFP_KERNEL); \
351 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ASSOCIATION_COMPLETE_IND, dst__, src__); \
352 msg__->interfaceTag = (interfaceTag__); \
353 msg__->status = (status__); \
354 msg__->connectionInfo = (connectionInfo__); \
355 msg__->deauthReason = (deauthReason__);
357 #define CsrWifiSmeAssociationCompleteIndSendTo(dst__, src__, interfaceTag__, status__, connectionInfo__, deauthReason__) \
359 CsrWifiSmeAssociationCompleteInd *msg__; \
360 CsrWifiSmeAssociationCompleteIndCreate(msg__, dst__, src__, interfaceTag__, status__, connectionInfo__, deauthReason__); \
361 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
364 #define CsrWifiSmeAssociationCompleteIndSend(dst__, interfaceTag__, status__, connectionInfo__, deauthReason__) \
365 CsrWifiSmeAssociationCompleteIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, connectionInfo__, deauthReason__)
367 /*******************************************************************************
370 CsrWifiSmeAssociationStartIndSend
373 The SME will send this primitive to all the tasks that have registered to
374 receive it whenever it begins an attempt to associate with an AP.
377 queue - Destination Task Queue
378 interfaceTag - Interface Identifier; unique identifier of an interface
379 address - BSSID of the associating network
380 ssid - Service Set identifier of the associating network
382 *******************************************************************************/
383 #define CsrWifiSmeAssociationStartIndCreate(msg__, dst__, src__, interfaceTag__, address__, ssid__) \
384 msg__ = kmalloc(sizeof(CsrWifiSmeAssociationStartInd), GFP_KERNEL); \
385 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ASSOCIATION_START_IND, dst__, src__); \
386 msg__->interfaceTag = (interfaceTag__); \
387 msg__->address = (address__); \
388 msg__->ssid = (ssid__);
390 #define CsrWifiSmeAssociationStartIndSendTo(dst__, src__, interfaceTag__, address__, ssid__) \
392 CsrWifiSmeAssociationStartInd *msg__; \
393 CsrWifiSmeAssociationStartIndCreate(msg__, dst__, src__, interfaceTag__, address__, ssid__); \
394 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
397 #define CsrWifiSmeAssociationStartIndSend(dst__, interfaceTag__, address__, ssid__) \
398 CsrWifiSmeAssociationStartIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, address__, ssid__)
400 /*******************************************************************************
403 CsrWifiSmeBlacklistReqSend
406 The wireless manager application should call this primitive to notify the
407 driver of any networks that should not be connected to. The interface
408 allows the wireless manager application to query, add, remove, and flush
409 the BSSIDs that the driver may not connect or roam to.
410 When this primitive adds to the black list the BSSID to which the SME is
411 currently connected, the SME will try to roam, if applicable, to another
412 BSSID in the same ESS; if the roaming procedure fails, the SME will
416 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
417 interfaceTag - Interface Identifier; unique identifier of an interface
418 action - The value of the CsrWifiSmeListAction parameter instructs
419 the driver to modify or provide the list of blacklisted
421 setAddressCount - Number of BSSIDs sent with this primitive
422 setAddresses - Pointer to the list of BBSIDs sent with the primitive, set
423 to NULL if none is sent.
425 *******************************************************************************/
426 #define CsrWifiSmeBlacklistReqCreate(msg__, dst__, src__, interfaceTag__, action__, setAddressCount__, setAddresses__) \
427 msg__ = kmalloc(sizeof(CsrWifiSmeBlacklistReq), GFP_KERNEL); \
428 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_BLACKLIST_REQ, dst__, src__); \
429 msg__->interfaceTag = (interfaceTag__); \
430 msg__->action = (action__); \
431 msg__->setAddressCount = (setAddressCount__); \
432 msg__->setAddresses = (setAddresses__);
434 #define CsrWifiSmeBlacklistReqSendTo(dst__, src__, interfaceTag__, action__, setAddressCount__, setAddresses__) \
436 CsrWifiSmeBlacklistReq *msg__; \
437 CsrWifiSmeBlacklistReqCreate(msg__, dst__, src__, interfaceTag__, action__, setAddressCount__, setAddresses__); \
438 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
441 #define CsrWifiSmeBlacklistReqSend(src__, interfaceTag__, action__, setAddressCount__, setAddresses__) \
442 CsrWifiSmeBlacklistReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__, action__, setAddressCount__, setAddresses__)
444 /*******************************************************************************
447 CsrWifiSmeBlacklistCfmSend
450 The SME will call this primitive when the action on the blacklist has
451 completed. For a GET action, this primitive also reports the list of
452 BBSIDs in the blacklist.
455 queue - Destination Task Queue
456 interfaceTag - Interface Identifier; unique identifier of an interface
457 status - Reports the result of the request
458 action - Action in the request
459 getAddressCount - This parameter is only relevant if action is
460 CSR_WIFI_SME_LIST_ACTION_GET:
461 number of BSSIDs sent with this primitive
462 getAddresses - Pointer to the list of BBSIDs sent with the primitive, set
463 to NULL if none is sent.
465 *******************************************************************************/
466 #define CsrWifiSmeBlacklistCfmCreate(msg__, dst__, src__, interfaceTag__, status__, action__, getAddressCount__, getAddresses__) \
467 msg__ = kmalloc(sizeof(CsrWifiSmeBlacklistCfm), GFP_KERNEL); \
468 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_BLACKLIST_CFM, dst__, src__); \
469 msg__->interfaceTag = (interfaceTag__); \
470 msg__->status = (status__); \
471 msg__->action = (action__); \
472 msg__->getAddressCount = (getAddressCount__); \
473 msg__->getAddresses = (getAddresses__);
475 #define CsrWifiSmeBlacklistCfmSendTo(dst__, src__, interfaceTag__, status__, action__, getAddressCount__, getAddresses__) \
477 CsrWifiSmeBlacklistCfm *msg__; \
478 CsrWifiSmeBlacklistCfmCreate(msg__, dst__, src__, interfaceTag__, status__, action__, getAddressCount__, getAddresses__); \
479 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
482 #define CsrWifiSmeBlacklistCfmSend(dst__, interfaceTag__, status__, action__, getAddressCount__, getAddresses__) \
483 CsrWifiSmeBlacklistCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, action__, getAddressCount__, getAddresses__)
485 /*******************************************************************************
488 CsrWifiSmeCalibrationDataGetReqSend
491 This primitive retrieves the Wi-Fi radio calibration data.
494 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
496 *******************************************************************************/
497 #define CsrWifiSmeCalibrationDataGetReqCreate(msg__, dst__, src__) \
498 msg__ = kmalloc(sizeof(CsrWifiSmeCalibrationDataGetReq), GFP_KERNEL); \
499 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CALIBRATION_DATA_GET_REQ, dst__, src__);
501 #define CsrWifiSmeCalibrationDataGetReqSendTo(dst__, src__) \
503 CsrWifiSmeCalibrationDataGetReq *msg__; \
504 CsrWifiSmeCalibrationDataGetReqCreate(msg__, dst__, src__); \
505 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
508 #define CsrWifiSmeCalibrationDataGetReqSend(src__) \
509 CsrWifiSmeCalibrationDataGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
511 /*******************************************************************************
514 CsrWifiSmeCalibrationDataGetCfmSend
517 This primitive reports the result of the request.
520 queue - Destination Task Queue
521 status - Reports the result of the request
522 calibrationDataLength - Number of bytes in the buffer pointed by
524 calibrationData - Pointer to a buffer of length calibrationDataLength
525 containing the calibration data
527 *******************************************************************************/
528 #define CsrWifiSmeCalibrationDataGetCfmCreate(msg__, dst__, src__, status__, calibrationDataLength__, calibrationData__) \
529 msg__ = kmalloc(sizeof(CsrWifiSmeCalibrationDataGetCfm), GFP_KERNEL); \
530 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CALIBRATION_DATA_GET_CFM, dst__, src__); \
531 msg__->status = (status__); \
532 msg__->calibrationDataLength = (calibrationDataLength__); \
533 msg__->calibrationData = (calibrationData__);
535 #define CsrWifiSmeCalibrationDataGetCfmSendTo(dst__, src__, status__, calibrationDataLength__, calibrationData__) \
537 CsrWifiSmeCalibrationDataGetCfm *msg__; \
538 CsrWifiSmeCalibrationDataGetCfmCreate(msg__, dst__, src__, status__, calibrationDataLength__, calibrationData__); \
539 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
542 #define CsrWifiSmeCalibrationDataGetCfmSend(dst__, status__, calibrationDataLength__, calibrationData__) \
543 CsrWifiSmeCalibrationDataGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, calibrationDataLength__, calibrationData__)
545 /*******************************************************************************
548 CsrWifiSmeCalibrationDataSetReqSend
551 This primitive sets the Wi-Fi radio calibration data.
552 The usage of the primitive with proper calibration data will avoid
553 time-consuming configuration after power-up.
556 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
557 calibrationDataLength - Number of bytes in the buffer pointed by
559 calibrationData - Pointer to a buffer of length calibrationDataLength
560 containing the calibration data
562 *******************************************************************************/
563 #define CsrWifiSmeCalibrationDataSetReqCreate(msg__, dst__, src__, calibrationDataLength__, calibrationData__) \
564 msg__ = kmalloc(sizeof(CsrWifiSmeCalibrationDataSetReq), GFP_KERNEL); \
565 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CALIBRATION_DATA_SET_REQ, dst__, src__); \
566 msg__->calibrationDataLength = (calibrationDataLength__); \
567 msg__->calibrationData = (calibrationData__);
569 #define CsrWifiSmeCalibrationDataSetReqSendTo(dst__, src__, calibrationDataLength__, calibrationData__) \
571 CsrWifiSmeCalibrationDataSetReq *msg__; \
572 CsrWifiSmeCalibrationDataSetReqCreate(msg__, dst__, src__, calibrationDataLength__, calibrationData__); \
573 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
576 #define CsrWifiSmeCalibrationDataSetReqSend(src__, calibrationDataLength__, calibrationData__) \
577 CsrWifiSmeCalibrationDataSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, calibrationDataLength__, calibrationData__)
579 /*******************************************************************************
582 CsrWifiSmeCalibrationDataSetCfmSend
585 This primitive reports the result of the request.
588 queue - Destination Task Queue
589 status - Reports the result of the request
591 *******************************************************************************/
592 #define CsrWifiSmeCalibrationDataSetCfmCreate(msg__, dst__, src__, status__) \
593 msg__ = kmalloc(sizeof(CsrWifiSmeCalibrationDataSetCfm), GFP_KERNEL); \
594 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CALIBRATION_DATA_SET_CFM, dst__, src__); \
595 msg__->status = (status__);
597 #define CsrWifiSmeCalibrationDataSetCfmSendTo(dst__, src__, status__) \
599 CsrWifiSmeCalibrationDataSetCfm *msg__; \
600 CsrWifiSmeCalibrationDataSetCfmCreate(msg__, dst__, src__, status__); \
601 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
604 #define CsrWifiSmeCalibrationDataSetCfmSend(dst__, status__) \
605 CsrWifiSmeCalibrationDataSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
607 /*******************************************************************************
610 CsrWifiSmeCcxConfigGetReqSend
613 This primitive gets the value of the CcxConfig parameter.
614 CURRENTLY NOT SUPPORTED.
617 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
618 interfaceTag - Interface Identifier; unique identifier of an interface
620 *******************************************************************************/
621 #define CsrWifiSmeCcxConfigGetReqCreate(msg__, dst__, src__, interfaceTag__) \
622 msg__ = kmalloc(sizeof(CsrWifiSmeCcxConfigGetReq), GFP_KERNEL); \
623 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CCX_CONFIG_GET_REQ, dst__, src__); \
624 msg__->interfaceTag = (interfaceTag__);
626 #define CsrWifiSmeCcxConfigGetReqSendTo(dst__, src__, interfaceTag__) \
628 CsrWifiSmeCcxConfigGetReq *msg__; \
629 CsrWifiSmeCcxConfigGetReqCreate(msg__, dst__, src__, interfaceTag__); \
630 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
633 #define CsrWifiSmeCcxConfigGetReqSend(src__, interfaceTag__) \
634 CsrWifiSmeCcxConfigGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__)
636 /*******************************************************************************
639 CsrWifiSmeCcxConfigGetCfmSend
642 This primitive reports the result of the request.
645 queue - Destination Task Queue
646 interfaceTag - Interface Identifier; unique identifier of an interface
647 status - Reports the result of the request
648 ccxConfig - Currently not supported
650 *******************************************************************************/
651 #define CsrWifiSmeCcxConfigGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, ccxConfig__) \
652 msg__ = kmalloc(sizeof(CsrWifiSmeCcxConfigGetCfm), GFP_KERNEL); \
653 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CCX_CONFIG_GET_CFM, dst__, src__); \
654 msg__->interfaceTag = (interfaceTag__); \
655 msg__->status = (status__); \
656 msg__->ccxConfig = (ccxConfig__);
658 #define CsrWifiSmeCcxConfigGetCfmSendTo(dst__, src__, interfaceTag__, status__, ccxConfig__) \
660 CsrWifiSmeCcxConfigGetCfm *msg__; \
661 CsrWifiSmeCcxConfigGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, ccxConfig__); \
662 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
665 #define CsrWifiSmeCcxConfigGetCfmSend(dst__, interfaceTag__, status__, ccxConfig__) \
666 CsrWifiSmeCcxConfigGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, ccxConfig__)
668 /*******************************************************************************
671 CsrWifiSmeCcxConfigSetReqSend
674 This primitive sets the value of the CcxConfig parameter.
675 CURRENTLY NOT SUPPORTED.
678 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
679 interfaceTag - Interface Identifier; unique identifier of an interface
680 ccxConfig - Currently not supported
682 *******************************************************************************/
683 #define CsrWifiSmeCcxConfigSetReqCreate(msg__, dst__, src__, interfaceTag__, ccxConfig__) \
684 msg__ = kmalloc(sizeof(CsrWifiSmeCcxConfigSetReq), GFP_KERNEL); \
685 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CCX_CONFIG_SET_REQ, dst__, src__); \
686 msg__->interfaceTag = (interfaceTag__); \
687 msg__->ccxConfig = (ccxConfig__);
689 #define CsrWifiSmeCcxConfigSetReqSendTo(dst__, src__, interfaceTag__, ccxConfig__) \
691 CsrWifiSmeCcxConfigSetReq *msg__; \
692 CsrWifiSmeCcxConfigSetReqCreate(msg__, dst__, src__, interfaceTag__, ccxConfig__); \
693 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
696 #define CsrWifiSmeCcxConfigSetReqSend(src__, interfaceTag__, ccxConfig__) \
697 CsrWifiSmeCcxConfigSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__, ccxConfig__)
699 /*******************************************************************************
702 CsrWifiSmeCcxConfigSetCfmSend
705 This primitive reports the result of the request.
708 queue - Destination Task Queue
709 interfaceTag - Interface Identifier; unique identifier of an interface
710 status - Reports the result of the request
712 *******************************************************************************/
713 #define CsrWifiSmeCcxConfigSetCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
714 msg__ = kmalloc(sizeof(CsrWifiSmeCcxConfigSetCfm), GFP_KERNEL); \
715 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CCX_CONFIG_SET_CFM, dst__, src__); \
716 msg__->interfaceTag = (interfaceTag__); \
717 msg__->status = (status__);
719 #define CsrWifiSmeCcxConfigSetCfmSendTo(dst__, src__, interfaceTag__, status__) \
721 CsrWifiSmeCcxConfigSetCfm *msg__; \
722 CsrWifiSmeCcxConfigSetCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
723 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
726 #define CsrWifiSmeCcxConfigSetCfmSend(dst__, interfaceTag__, status__) \
727 CsrWifiSmeCcxConfigSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
729 /*******************************************************************************
732 CsrWifiSmeCloakedSsidsGetReqSend
735 This primitive gets the value of the CloakedSsids parameter.
738 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
740 *******************************************************************************/
741 #define CsrWifiSmeCloakedSsidsGetReqCreate(msg__, dst__, src__) \
742 msg__ = kmalloc(sizeof(CsrWifiSmeCloakedSsidsGetReq), GFP_KERNEL); \
743 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CLOAKED_SSIDS_GET_REQ, dst__, src__);
745 #define CsrWifiSmeCloakedSsidsGetReqSendTo(dst__, src__) \
747 CsrWifiSmeCloakedSsidsGetReq *msg__; \
748 CsrWifiSmeCloakedSsidsGetReqCreate(msg__, dst__, src__); \
749 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
752 #define CsrWifiSmeCloakedSsidsGetReqSend(src__) \
753 CsrWifiSmeCloakedSsidsGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
755 /*******************************************************************************
758 CsrWifiSmeCloakedSsidsGetCfmSend
761 This primitive reports the result of the request.
764 queue - Destination Task Queue
765 status - Reports the result of the request
766 cloakedSsids - Reports list of cloaked SSIDs that are explicitly scanned for
769 *******************************************************************************/
770 #define CsrWifiSmeCloakedSsidsGetCfmCreate(msg__, dst__, src__, status__, cloakedSsids__) \
771 msg__ = kmalloc(sizeof(CsrWifiSmeCloakedSsidsGetCfm), GFP_KERNEL); \
772 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CLOAKED_SSIDS_GET_CFM, dst__, src__); \
773 msg__->status = (status__); \
774 msg__->cloakedSsids = (cloakedSsids__);
776 #define CsrWifiSmeCloakedSsidsGetCfmSendTo(dst__, src__, status__, cloakedSsids__) \
778 CsrWifiSmeCloakedSsidsGetCfm *msg__; \
779 CsrWifiSmeCloakedSsidsGetCfmCreate(msg__, dst__, src__, status__, cloakedSsids__); \
780 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
783 #define CsrWifiSmeCloakedSsidsGetCfmSend(dst__, status__, cloakedSsids__) \
784 CsrWifiSmeCloakedSsidsGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, cloakedSsids__)
786 /*******************************************************************************
789 CsrWifiSmeCloakedSsidsSetReqSend
792 This primitive sets the list of cloaked SSIDs for which the WMA possesses
794 When the driver detects a cloaked AP, the SME will explicitly scan for it
795 using the list of cloaked SSIDs provided it, and, if the scan succeeds,
796 it will report the AP to the WMA either via CSR_WIFI_SME_SCAN_RESULT_IND
797 (if registered) or via CSR_WIFI_SCAN_RESULT_GET_CFM.
800 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
801 cloakedSsids - Sets the list of cloaked SSIDs
803 *******************************************************************************/
804 #define CsrWifiSmeCloakedSsidsSetReqCreate(msg__, dst__, src__, cloakedSsids__) \
805 msg__ = kmalloc(sizeof(CsrWifiSmeCloakedSsidsSetReq), GFP_KERNEL); \
806 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CLOAKED_SSIDS_SET_REQ, dst__, src__); \
807 msg__->cloakedSsids = (cloakedSsids__);
809 #define CsrWifiSmeCloakedSsidsSetReqSendTo(dst__, src__, cloakedSsids__) \
811 CsrWifiSmeCloakedSsidsSetReq *msg__; \
812 CsrWifiSmeCloakedSsidsSetReqCreate(msg__, dst__, src__, cloakedSsids__); \
813 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
816 #define CsrWifiSmeCloakedSsidsSetReqSend(src__, cloakedSsids__) \
817 CsrWifiSmeCloakedSsidsSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, cloakedSsids__)
819 /*******************************************************************************
822 CsrWifiSmeCloakedSsidsSetCfmSend
825 This primitive reports the result of the request.
828 queue - Destination Task Queue
829 status - Reports the result of the request
831 *******************************************************************************/
832 #define CsrWifiSmeCloakedSsidsSetCfmCreate(msg__, dst__, src__, status__) \
833 msg__ = kmalloc(sizeof(CsrWifiSmeCloakedSsidsSetCfm), GFP_KERNEL); \
834 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CLOAKED_SSIDS_SET_CFM, dst__, src__); \
835 msg__->status = (status__);
837 #define CsrWifiSmeCloakedSsidsSetCfmSendTo(dst__, src__, status__) \
839 CsrWifiSmeCloakedSsidsSetCfm *msg__; \
840 CsrWifiSmeCloakedSsidsSetCfmCreate(msg__, dst__, src__, status__); \
841 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
844 #define CsrWifiSmeCloakedSsidsSetCfmSend(dst__, status__) \
845 CsrWifiSmeCloakedSsidsSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
847 /*******************************************************************************
850 CsrWifiSmeCoexConfigGetReqSend
853 This primitive gets the value of the CoexConfig parameter.
856 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
858 *******************************************************************************/
859 #define CsrWifiSmeCoexConfigGetReqCreate(msg__, dst__, src__) \
860 msg__ = kmalloc(sizeof(CsrWifiSmeCoexConfigGetReq), GFP_KERNEL); \
861 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_COEX_CONFIG_GET_REQ, dst__, src__);
863 #define CsrWifiSmeCoexConfigGetReqSendTo(dst__, src__) \
865 CsrWifiSmeCoexConfigGetReq *msg__; \
866 CsrWifiSmeCoexConfigGetReqCreate(msg__, dst__, src__); \
867 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
870 #define CsrWifiSmeCoexConfigGetReqSend(src__) \
871 CsrWifiSmeCoexConfigGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
873 /*******************************************************************************
876 CsrWifiSmeCoexConfigGetCfmSend
879 This primitive reports the result of the request.
882 queue - Destination Task Queue
883 status - Reports the result of the request
884 coexConfig - Reports the parameters used to configure the coexistence
887 *******************************************************************************/
888 #define CsrWifiSmeCoexConfigGetCfmCreate(msg__, dst__, src__, status__, coexConfig__) \
889 msg__ = kmalloc(sizeof(CsrWifiSmeCoexConfigGetCfm), GFP_KERNEL); \
890 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_COEX_CONFIG_GET_CFM, dst__, src__); \
891 msg__->status = (status__); \
892 msg__->coexConfig = (coexConfig__);
894 #define CsrWifiSmeCoexConfigGetCfmSendTo(dst__, src__, status__, coexConfig__) \
896 CsrWifiSmeCoexConfigGetCfm *msg__; \
897 CsrWifiSmeCoexConfigGetCfmCreate(msg__, dst__, src__, status__, coexConfig__); \
898 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
901 #define CsrWifiSmeCoexConfigGetCfmSend(dst__, status__, coexConfig__) \
902 CsrWifiSmeCoexConfigGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, coexConfig__)
904 /*******************************************************************************
907 CsrWifiSmeCoexConfigSetReqSend
910 This primitive sets the value of the CoexConfig parameter.
913 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
914 coexConfig - Configures the coexistence behaviour
916 *******************************************************************************/
917 #define CsrWifiSmeCoexConfigSetReqCreate(msg__, dst__, src__, coexConfig__) \
918 msg__ = kmalloc(sizeof(CsrWifiSmeCoexConfigSetReq), GFP_KERNEL); \
919 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_COEX_CONFIG_SET_REQ, dst__, src__); \
920 msg__->coexConfig = (coexConfig__);
922 #define CsrWifiSmeCoexConfigSetReqSendTo(dst__, src__, coexConfig__) \
924 CsrWifiSmeCoexConfigSetReq *msg__; \
925 CsrWifiSmeCoexConfigSetReqCreate(msg__, dst__, src__, coexConfig__); \
926 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
929 #define CsrWifiSmeCoexConfigSetReqSend(src__, coexConfig__) \
930 CsrWifiSmeCoexConfigSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, coexConfig__)
932 /*******************************************************************************
935 CsrWifiSmeCoexConfigSetCfmSend
938 This primitive reports the result of the request.
941 queue - Destination Task Queue
942 status - Reports the result of the request
944 *******************************************************************************/
945 #define CsrWifiSmeCoexConfigSetCfmCreate(msg__, dst__, src__, status__) \
946 msg__ = kmalloc(sizeof(CsrWifiSmeCoexConfigSetCfm), GFP_KERNEL); \
947 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_COEX_CONFIG_SET_CFM, dst__, src__); \
948 msg__->status = (status__);
950 #define CsrWifiSmeCoexConfigSetCfmSendTo(dst__, src__, status__) \
952 CsrWifiSmeCoexConfigSetCfm *msg__; \
953 CsrWifiSmeCoexConfigSetCfmCreate(msg__, dst__, src__, status__); \
954 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
957 #define CsrWifiSmeCoexConfigSetCfmSend(dst__, status__) \
958 CsrWifiSmeCoexConfigSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
960 /*******************************************************************************
963 CsrWifiSmeCoexInfoGetReqSend
966 This primitive gets the value of the CoexInfo parameter.
969 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
971 *******************************************************************************/
972 #define CsrWifiSmeCoexInfoGetReqCreate(msg__, dst__, src__) \
973 msg__ = kmalloc(sizeof(CsrWifiSmeCoexInfoGetReq), GFP_KERNEL); \
974 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_COEX_INFO_GET_REQ, dst__, src__);
976 #define CsrWifiSmeCoexInfoGetReqSendTo(dst__, src__) \
978 CsrWifiSmeCoexInfoGetReq *msg__; \
979 CsrWifiSmeCoexInfoGetReqCreate(msg__, dst__, src__); \
980 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
983 #define CsrWifiSmeCoexInfoGetReqSend(src__) \
984 CsrWifiSmeCoexInfoGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
986 /*******************************************************************************
989 CsrWifiSmeCoexInfoGetCfmSend
992 This primitive reports the result of the request.
995 queue - Destination Task Queue
996 status - Reports the result of the request
997 coexInfo - Reports information and state related to coexistence.
999 *******************************************************************************/
1000 #define CsrWifiSmeCoexInfoGetCfmCreate(msg__, dst__, src__, status__, coexInfo__) \
1001 msg__ = kmalloc(sizeof(CsrWifiSmeCoexInfoGetCfm), GFP_KERNEL); \
1002 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_COEX_INFO_GET_CFM, dst__, src__); \
1003 msg__->status = (status__); \
1004 msg__->coexInfo = (coexInfo__);
1006 #define CsrWifiSmeCoexInfoGetCfmSendTo(dst__, src__, status__, coexInfo__) \
1008 CsrWifiSmeCoexInfoGetCfm *msg__; \
1009 CsrWifiSmeCoexInfoGetCfmCreate(msg__, dst__, src__, status__, coexInfo__); \
1010 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1013 #define CsrWifiSmeCoexInfoGetCfmSend(dst__, status__, coexInfo__) \
1014 CsrWifiSmeCoexInfoGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, coexInfo__)
1016 /*******************************************************************************
1019 CsrWifiSmeConnectReqSend
1022 The wireless manager application calls this primitive to start the
1023 process of joining an 802.11 wireless network or to start an ad hoc
1025 The structure pointed by connectionConfig contains parameters describing
1026 the network to join or, in case of an ad hoc network, to host or join.
1027 The SME will select a network, perform the IEEE 802.11 Join, Authenticate
1028 and Associate exchanges.
1029 The SME selects the networks from the current scan list that match both
1030 the SSID and BSSID, however either or both of these may be the wildcard
1031 value. Using this rule, the following operations are possible:
1032 * To connect to a network by name, specify the SSID and set the BSSID to
1033 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF. If there are two or more networks visible,
1034 the SME will select the one with the strongest signal.
1035 * To connect to a specific network, specify the BSSID. The SSID is
1036 optional, but if given it must match the SSID of the network. An empty
1037 SSID may be specified by setting the SSID length to zero. Please note
1038 that if the BSSID is specified (i.e. not equal to 0xFF 0xFF 0xFF 0xFF
1039 0xFF 0xFF), the SME will not attempt to roam if signal conditions become
1040 poor, even if there is an alternative AP with an SSID that matches the
1041 current network SSID.
1042 * To connect to any network matching the other parameters (i.e. security,
1043 etc), set the SSID length to zero and set the BSSID to 0xFF 0xFF 0xFF
1044 0xFF 0xFF 0xFF. In this case, the SME will order all available networks
1045 by their signal strengths and will iterate through this list until it
1046 successfully connects.
1047 NOTE: Specifying the BSSID will restrict the selection to one specific
1048 network. If SSID and BSSID are given, they must both match the network
1049 for it to be selected. To select a network based on the SSID only, the
1050 wireless manager application must set the BSSID to 0xFF 0xFF 0xFF 0xFF
1052 The SME will try to connect to each network that matches the provided
1053 parameters, one by one, until it succeeds or has tried unsuccessfully
1054 with all the matching networks.
1055 If there is no network that matches the parameters and the request allows
1056 to host an ad hoc network, the SME will advertise a new ad hoc network
1058 If the SME cannot connect, it will notify the failure in the confirm.
1061 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
1062 interfaceTag - Interface Identifier; unique identifier of an interface
1063 connectionConfig - Describes the candidate network to join or to host.
1065 *******************************************************************************/
1066 #define CsrWifiSmeConnectReqCreate(msg__, dst__, src__, interfaceTag__, connectionConfig__) \
1067 msg__ = kmalloc(sizeof(CsrWifiSmeConnectReq), GFP_KERNEL); \
1068 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CONNECT_REQ, dst__, src__); \
1069 msg__->interfaceTag = (interfaceTag__); \
1070 msg__->connectionConfig = (connectionConfig__);
1072 #define CsrWifiSmeConnectReqSendTo(dst__, src__, interfaceTag__, connectionConfig__) \
1074 CsrWifiSmeConnectReq *msg__; \
1075 CsrWifiSmeConnectReqCreate(msg__, dst__, src__, interfaceTag__, connectionConfig__); \
1076 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
1079 #define CsrWifiSmeConnectReqSend(src__, interfaceTag__, connectionConfig__) \
1080 CsrWifiSmeConnectReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__, connectionConfig__)
1082 /*******************************************************************************
1085 CsrWifiSmeConnectCfmSend
1088 The SME calls this primitive when the connection exchange is complete or
1089 all connection attempts fail.
1092 queue - Destination Task Queue
1093 interfaceTag - Interface Identifier; unique identifier of an interface
1094 status - Reports the result of the request.
1095 CSR_WIFI_SME_STATUS_NOT_FOUND: all attempts by the SME to
1096 locate the requested AP failed
1098 *******************************************************************************/
1099 #define CsrWifiSmeConnectCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
1100 msg__ = kmalloc(sizeof(CsrWifiSmeConnectCfm), GFP_KERNEL); \
1101 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CONNECT_CFM, dst__, src__); \
1102 msg__->interfaceTag = (interfaceTag__); \
1103 msg__->status = (status__);
1105 #define CsrWifiSmeConnectCfmSendTo(dst__, src__, interfaceTag__, status__) \
1107 CsrWifiSmeConnectCfm *msg__; \
1108 CsrWifiSmeConnectCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
1109 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1112 #define CsrWifiSmeConnectCfmSend(dst__, interfaceTag__, status__) \
1113 CsrWifiSmeConnectCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
1115 /*******************************************************************************
1118 CsrWifiSmeConnectionConfigGetReqSend
1121 This primitive gets the value of the ConnectionConfig parameter.
1124 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
1125 interfaceTag - Interface Identifier; unique identifier of an interface
1127 *******************************************************************************/
1128 #define CsrWifiSmeConnectionConfigGetReqCreate(msg__, dst__, src__, interfaceTag__) \
1129 msg__ = kmalloc(sizeof(CsrWifiSmeConnectionConfigGetReq), GFP_KERNEL); \
1130 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CONNECTION_CONFIG_GET_REQ, dst__, src__); \
1131 msg__->interfaceTag = (interfaceTag__);
1133 #define CsrWifiSmeConnectionConfigGetReqSendTo(dst__, src__, interfaceTag__) \
1135 CsrWifiSmeConnectionConfigGetReq *msg__; \
1136 CsrWifiSmeConnectionConfigGetReqCreate(msg__, dst__, src__, interfaceTag__); \
1137 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
1140 #define CsrWifiSmeConnectionConfigGetReqSend(src__, interfaceTag__) \
1141 CsrWifiSmeConnectionConfigGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__)
1143 /*******************************************************************************
1146 CsrWifiSmeConnectionConfigGetCfmSend
1149 This primitive reports the result of the request.
1152 queue - Destination Task Queue
1153 interfaceTag - Interface Identifier; unique identifier of an interface
1154 status - Reports the result of the request
1155 connectionConfig - Parameters used by the SME for selecting a network
1157 *******************************************************************************/
1158 #define CsrWifiSmeConnectionConfigGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, connectionConfig__) \
1159 msg__ = kmalloc(sizeof(CsrWifiSmeConnectionConfigGetCfm), GFP_KERNEL); \
1160 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CONNECTION_CONFIG_GET_CFM, dst__, src__); \
1161 msg__->interfaceTag = (interfaceTag__); \
1162 msg__->status = (status__); \
1163 msg__->connectionConfig = (connectionConfig__);
1165 #define CsrWifiSmeConnectionConfigGetCfmSendTo(dst__, src__, interfaceTag__, status__, connectionConfig__) \
1167 CsrWifiSmeConnectionConfigGetCfm *msg__; \
1168 CsrWifiSmeConnectionConfigGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, connectionConfig__); \
1169 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1172 #define CsrWifiSmeConnectionConfigGetCfmSend(dst__, interfaceTag__, status__, connectionConfig__) \
1173 CsrWifiSmeConnectionConfigGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, connectionConfig__)
1175 /*******************************************************************************
1178 CsrWifiSmeConnectionInfoGetReqSend
1181 This primitive gets the value of the ConnectionInfo parameter.
1184 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
1185 interfaceTag - Interface Identifier; unique identifier of an interface
1187 *******************************************************************************/
1188 #define CsrWifiSmeConnectionInfoGetReqCreate(msg__, dst__, src__, interfaceTag__) \
1189 msg__ = kmalloc(sizeof(CsrWifiSmeConnectionInfoGetReq), GFP_KERNEL); \
1190 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CONNECTION_INFO_GET_REQ, dst__, src__); \
1191 msg__->interfaceTag = (interfaceTag__);
1193 #define CsrWifiSmeConnectionInfoGetReqSendTo(dst__, src__, interfaceTag__) \
1195 CsrWifiSmeConnectionInfoGetReq *msg__; \
1196 CsrWifiSmeConnectionInfoGetReqCreate(msg__, dst__, src__, interfaceTag__); \
1197 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
1200 #define CsrWifiSmeConnectionInfoGetReqSend(src__, interfaceTag__) \
1201 CsrWifiSmeConnectionInfoGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__)
1203 /*******************************************************************************
1206 CsrWifiSmeConnectionInfoGetCfmSend
1209 This primitive reports the result of the request.
1212 queue - Destination Task Queue
1213 interfaceTag - Interface Identifier; unique identifier of an interface
1214 status - Reports the result of the request
1215 connectionInfo - Information about the current connection
1217 *******************************************************************************/
1218 #define CsrWifiSmeConnectionInfoGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, connectionInfo__) \
1219 msg__ = kmalloc(sizeof(CsrWifiSmeConnectionInfoGetCfm), GFP_KERNEL); \
1220 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CONNECTION_INFO_GET_CFM, dst__, src__); \
1221 msg__->interfaceTag = (interfaceTag__); \
1222 msg__->status = (status__); \
1223 msg__->connectionInfo = (connectionInfo__);
1225 #define CsrWifiSmeConnectionInfoGetCfmSendTo(dst__, src__, interfaceTag__, status__, connectionInfo__) \
1227 CsrWifiSmeConnectionInfoGetCfm *msg__; \
1228 CsrWifiSmeConnectionInfoGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, connectionInfo__); \
1229 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1232 #define CsrWifiSmeConnectionInfoGetCfmSend(dst__, interfaceTag__, status__, connectionInfo__) \
1233 CsrWifiSmeConnectionInfoGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, connectionInfo__)
1235 /*******************************************************************************
1238 CsrWifiSmeConnectionQualityIndSend
1241 The SME sends this primitive to all the tasks that have registered to
1242 receive it whenever the value of the current connection quality
1243 parameters change by more than a certain configurable amount.
1244 The wireless manager application may configure the trigger thresholds for
1245 this indication using the field in smeConfig parameter of
1246 CSR_WIFI_SME_SME_CONFIG_SET_REQ.
1247 Connection quality messages can be suppressed by setting both thresholds
1251 queue - Destination Task Queue
1252 interfaceTag - Interface Identifier; unique identifier of an interface
1253 linkQuality - Indicates the quality of the link
1255 *******************************************************************************/
1256 #define CsrWifiSmeConnectionQualityIndCreate(msg__, dst__, src__, interfaceTag__, linkQuality__) \
1257 msg__ = kmalloc(sizeof(CsrWifiSmeConnectionQualityInd), GFP_KERNEL); \
1258 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CONNECTION_QUALITY_IND, dst__, src__); \
1259 msg__->interfaceTag = (interfaceTag__); \
1260 msg__->linkQuality = (linkQuality__);
1262 #define CsrWifiSmeConnectionQualityIndSendTo(dst__, src__, interfaceTag__, linkQuality__) \
1264 CsrWifiSmeConnectionQualityInd *msg__; \
1265 CsrWifiSmeConnectionQualityIndCreate(msg__, dst__, src__, interfaceTag__, linkQuality__); \
1266 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1269 #define CsrWifiSmeConnectionQualityIndSend(dst__, interfaceTag__, linkQuality__) \
1270 CsrWifiSmeConnectionQualityIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, linkQuality__)
1272 /*******************************************************************************
1275 CsrWifiSmeConnectionStatsGetReqSend
1278 This primitive gets the value of the ConnectionStats parameter.
1281 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
1282 interfaceTag - Interface Identifier; unique identifier of an interface
1284 *******************************************************************************/
1285 #define CsrWifiSmeConnectionStatsGetReqCreate(msg__, dst__, src__, interfaceTag__) \
1286 msg__ = kmalloc(sizeof(CsrWifiSmeConnectionStatsGetReq), GFP_KERNEL); \
1287 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CONNECTION_STATS_GET_REQ, dst__, src__); \
1288 msg__->interfaceTag = (interfaceTag__);
1290 #define CsrWifiSmeConnectionStatsGetReqSendTo(dst__, src__, interfaceTag__) \
1292 CsrWifiSmeConnectionStatsGetReq *msg__; \
1293 CsrWifiSmeConnectionStatsGetReqCreate(msg__, dst__, src__, interfaceTag__); \
1294 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
1297 #define CsrWifiSmeConnectionStatsGetReqSend(src__, interfaceTag__) \
1298 CsrWifiSmeConnectionStatsGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__)
1300 /*******************************************************************************
1303 CsrWifiSmeConnectionStatsGetCfmSend
1306 This primitive reports the result of the request.
1309 queue - Destination Task Queue
1310 interfaceTag - Interface Identifier; unique identifier of an interface
1311 status - Reports the result of the request
1312 connectionStats - Statistics for current connection.
1314 *******************************************************************************/
1315 #define CsrWifiSmeConnectionStatsGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, connectionStats__) \
1316 msg__ = kmalloc(sizeof(CsrWifiSmeConnectionStatsGetCfm), GFP_KERNEL); \
1317 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CONNECTION_STATS_GET_CFM, dst__, src__); \
1318 msg__->interfaceTag = (interfaceTag__); \
1319 msg__->status = (status__); \
1320 msg__->connectionStats = (connectionStats__);
1322 #define CsrWifiSmeConnectionStatsGetCfmSendTo(dst__, src__, interfaceTag__, status__, connectionStats__) \
1324 CsrWifiSmeConnectionStatsGetCfm *msg__; \
1325 CsrWifiSmeConnectionStatsGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, connectionStats__); \
1326 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1329 #define CsrWifiSmeConnectionStatsGetCfmSend(dst__, interfaceTag__, status__, connectionStats__) \
1330 CsrWifiSmeConnectionStatsGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, connectionStats__)
1332 /*******************************************************************************
1335 CsrWifiSmeCoreDumpIndSend
1338 The SME will send this primitive to all the tasks that have registered to
1339 receive Wi-Fi Chip core dump data.
1340 The core dump data may be fragmented and sent using more than one
1342 To indicate that all the data has been sent, the last indication contains
1343 a 'length' of 0 and 'data' of NULL.
1346 queue - Destination Task Queue
1347 dataLength - Number of bytes in the buffer pointed to by 'data'
1348 data - Pointer to the buffer containing 'dataLength' bytes of core
1351 *******************************************************************************/
1352 #define CsrWifiSmeCoreDumpIndCreate(msg__, dst__, src__, dataLength__, data__) \
1353 msg__ = kmalloc(sizeof(CsrWifiSmeCoreDumpInd), GFP_KERNEL); \
1354 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_CORE_DUMP_IND, dst__, src__); \
1355 msg__->dataLength = (dataLength__); \
1356 msg__->data = (data__);
1358 #define CsrWifiSmeCoreDumpIndSendTo(dst__, src__, dataLength__, data__) \
1360 CsrWifiSmeCoreDumpInd *msg__; \
1361 CsrWifiSmeCoreDumpIndCreate(msg__, dst__, src__, dataLength__, data__); \
1362 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1365 #define CsrWifiSmeCoreDumpIndSend(dst__, dataLength__, data__) \
1366 CsrWifiSmeCoreDumpIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, dataLength__, data__)
1368 /*******************************************************************************
1371 CsrWifiSmeDeactivateReqSend
1374 The WMA sends this primitive to deactivate the SME.
1377 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
1379 *******************************************************************************/
1380 #define CsrWifiSmeDeactivateReqCreate(msg__, dst__, src__) \
1381 msg__ = kmalloc(sizeof(CsrWifiSmeDeactivateReq), GFP_KERNEL); \
1382 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_DEACTIVATE_REQ, dst__, src__);
1384 #define CsrWifiSmeDeactivateReqSendTo(dst__, src__) \
1386 CsrWifiSmeDeactivateReq *msg__; \
1387 CsrWifiSmeDeactivateReqCreate(msg__, dst__, src__); \
1388 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
1391 #define CsrWifiSmeDeactivateReqSend(src__) \
1392 CsrWifiSmeDeactivateReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
1394 /*******************************************************************************
1397 CsrWifiSmeDeactivateCfmSend
1400 The SME sends this primitive when the deactivation is complete.
1401 The WMA cannot send any more primitives until it actives the SME again
1402 sending another CSR_WIFI_SME_ACTIVATE_REQ.
1405 queue - Destination Task Queue
1406 status - Reports the result of the request
1408 *******************************************************************************/
1409 #define CsrWifiSmeDeactivateCfmCreate(msg__, dst__, src__, status__) \
1410 msg__ = kmalloc(sizeof(CsrWifiSmeDeactivateCfm), GFP_KERNEL); \
1411 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_DEACTIVATE_CFM, dst__, src__); \
1412 msg__->status = (status__);
1414 #define CsrWifiSmeDeactivateCfmSendTo(dst__, src__, status__) \
1416 CsrWifiSmeDeactivateCfm *msg__; \
1417 CsrWifiSmeDeactivateCfmCreate(msg__, dst__, src__, status__); \
1418 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1421 #define CsrWifiSmeDeactivateCfmSend(dst__, status__) \
1422 CsrWifiSmeDeactivateCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
1424 /*******************************************************************************
1427 CsrWifiSmeDisconnectReqSend
1430 The wireless manager application may disconnect from the current network
1431 by calling this primitive
1434 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
1435 interfaceTag - Interface Identifier; unique identifier of an interface
1437 *******************************************************************************/
1438 #define CsrWifiSmeDisconnectReqCreate(msg__, dst__, src__, interfaceTag__) \
1439 msg__ = kmalloc(sizeof(CsrWifiSmeDisconnectReq), GFP_KERNEL); \
1440 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_DISCONNECT_REQ, dst__, src__); \
1441 msg__->interfaceTag = (interfaceTag__);
1443 #define CsrWifiSmeDisconnectReqSendTo(dst__, src__, interfaceTag__) \
1445 CsrWifiSmeDisconnectReq *msg__; \
1446 CsrWifiSmeDisconnectReqCreate(msg__, dst__, src__, interfaceTag__); \
1447 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
1450 #define CsrWifiSmeDisconnectReqSend(src__, interfaceTag__) \
1451 CsrWifiSmeDisconnectReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__)
1453 /*******************************************************************************
1456 CsrWifiSmeDisconnectCfmSend
1459 On reception of CSR_WIFI_SME_DISCONNECT_REQ the SME will perform a
1460 disconnect operation, sending a CsrWifiSmeMediaStatusInd with
1461 CSR_WIFI_SME_MEDIA_STATUS_DISCONNECTED and then call this primitive when
1462 disconnection is complete.
1465 queue - Destination Task Queue
1466 interfaceTag - Interface Identifier; unique identifier of an interface
1467 status - Reports the result of the request
1469 *******************************************************************************/
1470 #define CsrWifiSmeDisconnectCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
1471 msg__ = kmalloc(sizeof(CsrWifiSmeDisconnectCfm), GFP_KERNEL); \
1472 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_DISCONNECT_CFM, dst__, src__); \
1473 msg__->interfaceTag = (interfaceTag__); \
1474 msg__->status = (status__);
1476 #define CsrWifiSmeDisconnectCfmSendTo(dst__, src__, interfaceTag__, status__) \
1478 CsrWifiSmeDisconnectCfm *msg__; \
1479 CsrWifiSmeDisconnectCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
1480 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1483 #define CsrWifiSmeDisconnectCfmSend(dst__, interfaceTag__, status__) \
1484 CsrWifiSmeDisconnectCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
1486 /*******************************************************************************
1489 CsrWifiSmeErrorIndSend
1492 Important error message indicating a error of some importance
1495 queue - Destination Task Queue
1496 errorMessage - Contains the error message.
1498 *******************************************************************************/
1499 #define CsrWifiSmeErrorIndCreate(msg__, dst__, src__, errorMessage__) \
1500 msg__ = kmalloc(sizeof(CsrWifiSmeErrorInd), GFP_KERNEL); \
1501 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ERROR_IND, dst__, src__); \
1502 msg__->errorMessage = (errorMessage__);
1504 #define CsrWifiSmeErrorIndSendTo(dst__, src__, errorMessage__) \
1506 CsrWifiSmeErrorInd *msg__; \
1507 CsrWifiSmeErrorIndCreate(msg__, dst__, src__, errorMessage__); \
1508 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1511 #define CsrWifiSmeErrorIndSend(dst__, errorMessage__) \
1512 CsrWifiSmeErrorIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, errorMessage__)
1514 /*******************************************************************************
1517 CsrWifiSmeEventMaskSetReqSend
1520 The wireless manager application may register with the SME to receive
1521 notification of interesting events. Indications will be sent only if the
1522 wireless manager explicitly registers to be notified of that event.
1523 indMask is a bit mask of values defined in CsrWifiSmeIndicationsMask.
1526 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
1527 indMask - Set mask with values from CsrWifiSmeIndications
1529 *******************************************************************************/
1530 #define CsrWifiSmeEventMaskSetReqCreate(msg__, dst__, src__, indMask__) \
1531 msg__ = kmalloc(sizeof(CsrWifiSmeEventMaskSetReq), GFP_KERNEL); \
1532 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_EVENT_MASK_SET_REQ, dst__, src__); \
1533 msg__->indMask = (indMask__);
1535 #define CsrWifiSmeEventMaskSetReqSendTo(dst__, src__, indMask__) \
1537 CsrWifiSmeEventMaskSetReq *msg__; \
1538 CsrWifiSmeEventMaskSetReqCreate(msg__, dst__, src__, indMask__); \
1539 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
1542 #define CsrWifiSmeEventMaskSetReqSend(src__, indMask__) \
1543 CsrWifiSmeEventMaskSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, indMask__)
1545 /*******************************************************************************
1548 CsrWifiSmeEventMaskSetCfmSend
1551 The SME calls the primitive to report the result of the request
1555 queue - Destination Task Queue
1556 status - Reports the result of the request
1558 *******************************************************************************/
1559 #define CsrWifiSmeEventMaskSetCfmCreate(msg__, dst__, src__, status__) \
1560 msg__ = kmalloc(sizeof(CsrWifiSmeEventMaskSetCfm), GFP_KERNEL); \
1561 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_EVENT_MASK_SET_CFM, dst__, src__); \
1562 msg__->status = (status__);
1564 #define CsrWifiSmeEventMaskSetCfmSendTo(dst__, src__, status__) \
1566 CsrWifiSmeEventMaskSetCfm *msg__; \
1567 CsrWifiSmeEventMaskSetCfmCreate(msg__, dst__, src__, status__); \
1568 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1571 #define CsrWifiSmeEventMaskSetCfmSend(dst__, status__) \
1572 CsrWifiSmeEventMaskSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
1574 /*******************************************************************************
1577 CsrWifiSmeHostConfigGetReqSend
1580 This primitive gets the value of the hostConfig parameter.
1583 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
1584 interfaceTag - Interface Identifier; unique identifier of an interface
1586 *******************************************************************************/
1587 #define CsrWifiSmeHostConfigGetReqCreate(msg__, dst__, src__, interfaceTag__) \
1588 msg__ = kmalloc(sizeof(CsrWifiSmeHostConfigGetReq), GFP_KERNEL); \
1589 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_HOST_CONFIG_GET_REQ, dst__, src__); \
1590 msg__->interfaceTag = (interfaceTag__);
1592 #define CsrWifiSmeHostConfigGetReqSendTo(dst__, src__, interfaceTag__) \
1594 CsrWifiSmeHostConfigGetReq *msg__; \
1595 CsrWifiSmeHostConfigGetReqCreate(msg__, dst__, src__, interfaceTag__); \
1596 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
1599 #define CsrWifiSmeHostConfigGetReqSend(src__, interfaceTag__) \
1600 CsrWifiSmeHostConfigGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__)
1602 /*******************************************************************************
1605 CsrWifiSmeHostConfigGetCfmSend
1608 This primitive reports the result of the request.
1611 queue - Destination Task Queue
1612 interfaceTag - Interface Identifier; unique identifier of an interface
1613 status - Reports the result of the request
1614 hostConfig - Current host power state.
1616 *******************************************************************************/
1617 #define CsrWifiSmeHostConfigGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, hostConfig__) \
1618 msg__ = kmalloc(sizeof(CsrWifiSmeHostConfigGetCfm), GFP_KERNEL); \
1619 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_HOST_CONFIG_GET_CFM, dst__, src__); \
1620 msg__->interfaceTag = (interfaceTag__); \
1621 msg__->status = (status__); \
1622 msg__->hostConfig = (hostConfig__);
1624 #define CsrWifiSmeHostConfigGetCfmSendTo(dst__, src__, interfaceTag__, status__, hostConfig__) \
1626 CsrWifiSmeHostConfigGetCfm *msg__; \
1627 CsrWifiSmeHostConfigGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, hostConfig__); \
1628 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1631 #define CsrWifiSmeHostConfigGetCfmSend(dst__, interfaceTag__, status__, hostConfig__) \
1632 CsrWifiSmeHostConfigGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, hostConfig__)
1634 /*******************************************************************************
1637 CsrWifiSmeHostConfigSetReqSend
1640 This primitive sets the value of the hostConfig parameter.
1643 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
1644 interfaceTag - Interface Identifier; unique identifier of an interface
1645 hostConfig - Communicates a change of host power state (for example, on
1646 mains power, on battery power etc) and of the periodicity of
1649 *******************************************************************************/
1650 #define CsrWifiSmeHostConfigSetReqCreate(msg__, dst__, src__, interfaceTag__, hostConfig__) \
1651 msg__ = kmalloc(sizeof(CsrWifiSmeHostConfigSetReq), GFP_KERNEL); \
1652 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_HOST_CONFIG_SET_REQ, dst__, src__); \
1653 msg__->interfaceTag = (interfaceTag__); \
1654 msg__->hostConfig = (hostConfig__);
1656 #define CsrWifiSmeHostConfigSetReqSendTo(dst__, src__, interfaceTag__, hostConfig__) \
1658 CsrWifiSmeHostConfigSetReq *msg__; \
1659 CsrWifiSmeHostConfigSetReqCreate(msg__, dst__, src__, interfaceTag__, hostConfig__); \
1660 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
1663 #define CsrWifiSmeHostConfigSetReqSend(src__, interfaceTag__, hostConfig__) \
1664 CsrWifiSmeHostConfigSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__, hostConfig__)
1666 /*******************************************************************************
1669 CsrWifiSmeHostConfigSetCfmSend
1672 This primitive reports the result of the request.
1675 queue - Destination Task Queue
1676 interfaceTag - Interface Identifier; unique identifier of an interface
1677 status - Reports the result of the request
1679 *******************************************************************************/
1680 #define CsrWifiSmeHostConfigSetCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
1681 msg__ = kmalloc(sizeof(CsrWifiSmeHostConfigSetCfm), GFP_KERNEL); \
1682 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_HOST_CONFIG_SET_CFM, dst__, src__); \
1683 msg__->interfaceTag = (interfaceTag__); \
1684 msg__->status = (status__);
1686 #define CsrWifiSmeHostConfigSetCfmSendTo(dst__, src__, interfaceTag__, status__) \
1688 CsrWifiSmeHostConfigSetCfm *msg__; \
1689 CsrWifiSmeHostConfigSetCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
1690 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1693 #define CsrWifiSmeHostConfigSetCfmSend(dst__, interfaceTag__, status__) \
1694 CsrWifiSmeHostConfigSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
1696 /*******************************************************************************
1699 CsrWifiSmeIbssStationIndSend
1702 The SME will send this primitive to indicate that a station has joined or
1703 left the ad-hoc network.
1706 queue - Destination Task Queue
1707 address - MAC address of the station that has joined or left
1708 isconnected - TRUE if the station joined, FALSE if the station left
1710 *******************************************************************************/
1711 #define CsrWifiSmeIbssStationIndCreate(msg__, dst__, src__, address__, isconnected__) \
1712 msg__ = kmalloc(sizeof(CsrWifiSmeIbssStationInd), GFP_KERNEL); \
1713 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_IBSS_STATION_IND, dst__, src__); \
1714 msg__->address = (address__); \
1715 msg__->isconnected = (isconnected__);
1717 #define CsrWifiSmeIbssStationIndSendTo(dst__, src__, address__, isconnected__) \
1719 CsrWifiSmeIbssStationInd *msg__; \
1720 CsrWifiSmeIbssStationIndCreate(msg__, dst__, src__, address__, isconnected__); \
1721 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1724 #define CsrWifiSmeIbssStationIndSend(dst__, address__, isconnected__) \
1725 CsrWifiSmeIbssStationIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, address__, isconnected__)
1727 /*******************************************************************************
1730 CsrWifiSmeInfoIndSend
1733 Message indicating a some info about current activity. Mostly of interest
1734 in testing but may be useful in the field.
1737 queue - Destination Task Queue
1738 infoMessage - Contains the message.
1740 *******************************************************************************/
1741 #define CsrWifiSmeInfoIndCreate(msg__, dst__, src__, infoMessage__) \
1742 msg__ = kmalloc(sizeof(CsrWifiSmeInfoInd), GFP_KERNEL); \
1743 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_INFO_IND, dst__, src__); \
1744 msg__->infoMessage = (infoMessage__);
1746 #define CsrWifiSmeInfoIndSendTo(dst__, src__, infoMessage__) \
1748 CsrWifiSmeInfoInd *msg__; \
1749 CsrWifiSmeInfoIndCreate(msg__, dst__, src__, infoMessage__); \
1750 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1753 #define CsrWifiSmeInfoIndSend(dst__, infoMessage__) \
1754 CsrWifiSmeInfoIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, infoMessage__)
1756 /*******************************************************************************
1759 CsrWifiSmeInterfaceCapabilityGetReqSend
1762 The Wireless Manager calls this primitive to ask the SME for the
1763 capabilities of the supported interfaces
1766 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
1768 *******************************************************************************/
1769 #define CsrWifiSmeInterfaceCapabilityGetReqCreate(msg__, dst__, src__) \
1770 msg__ = kmalloc(sizeof(CsrWifiSmeInterfaceCapabilityGetReq), GFP_KERNEL); \
1771 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_INTERFACE_CAPABILITY_GET_REQ, dst__, src__);
1773 #define CsrWifiSmeInterfaceCapabilityGetReqSendTo(dst__, src__) \
1775 CsrWifiSmeInterfaceCapabilityGetReq *msg__; \
1776 CsrWifiSmeInterfaceCapabilityGetReqCreate(msg__, dst__, src__); \
1777 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
1780 #define CsrWifiSmeInterfaceCapabilityGetReqSend(src__) \
1781 CsrWifiSmeInterfaceCapabilityGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
1783 /*******************************************************************************
1786 CsrWifiSmeInterfaceCapabilityGetCfmSend
1789 This primitive reports the result of the request.
1792 queue - Destination Task Queue
1793 status - Result of the request
1794 numInterfaces - Number of the interfaces supported
1795 capBitmap - Points to the list of capabilities bitmaps provided for each
1797 The bits represent the following capabilities:
1798 -bits 7 to 4-Reserved
1804 *******************************************************************************/
1805 #define CsrWifiSmeInterfaceCapabilityGetCfmCreate(msg__, dst__, src__, status__, numInterfaces__, capBitmap__) \
1806 msg__ = kmalloc(sizeof(CsrWifiSmeInterfaceCapabilityGetCfm), GFP_KERNEL); \
1807 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_INTERFACE_CAPABILITY_GET_CFM, dst__, src__); \
1808 msg__->status = (status__); \
1809 msg__->numInterfaces = (numInterfaces__); \
1810 memcpy(msg__->capBitmap, (capBitmap__), sizeof(u8) * 2);
1812 #define CsrWifiSmeInterfaceCapabilityGetCfmSendTo(dst__, src__, status__, numInterfaces__, capBitmap__) \
1814 CsrWifiSmeInterfaceCapabilityGetCfm *msg__; \
1815 CsrWifiSmeInterfaceCapabilityGetCfmCreate(msg__, dst__, src__, status__, numInterfaces__, capBitmap__); \
1816 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1819 #define CsrWifiSmeInterfaceCapabilityGetCfmSend(dst__, status__, numInterfaces__, capBitmap__) \
1820 CsrWifiSmeInterfaceCapabilityGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, numInterfaces__, capBitmap__)
1822 /*******************************************************************************
1825 CsrWifiSmeKeyReqSend
1828 The wireless manager application calls this primitive to add or remove
1829 keys that the chip should use for encryption of data.
1830 The interface allows the wireless manager application to add and remove
1831 keys according to the specified action.
1834 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
1835 interfaceTag - Interface Identifier; unique identifier of an interface
1836 action - The value of the CsrWifiSmeListAction parameter instructs the
1837 driver to modify or provide the list of keys.
1838 CSR_WIFI_SME_LIST_ACTION_GET is not supported here.
1839 key - Key to be added or removed
1841 *******************************************************************************/
1842 #define CsrWifiSmeKeyReqCreate(msg__, dst__, src__, interfaceTag__, action__, key__) \
1843 msg__ = kmalloc(sizeof(CsrWifiSmeKeyReq), GFP_KERNEL); \
1844 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_KEY_REQ, dst__, src__); \
1845 msg__->interfaceTag = (interfaceTag__); \
1846 msg__->action = (action__); \
1847 msg__->key = (key__);
1849 #define CsrWifiSmeKeyReqSendTo(dst__, src__, interfaceTag__, action__, key__) \
1851 CsrWifiSmeKeyReq *msg__; \
1852 CsrWifiSmeKeyReqCreate(msg__, dst__, src__, interfaceTag__, action__, key__); \
1853 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
1856 #define CsrWifiSmeKeyReqSend(src__, interfaceTag__, action__, key__) \
1857 CsrWifiSmeKeyReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__, action__, key__)
1859 /*******************************************************************************
1862 CsrWifiSmeKeyCfmSend
1865 The SME calls the primitive to report the result of the request
1869 queue - Destination Task Queue
1870 interfaceTag - Interface Identifier; unique identifier of an interface
1871 status - Reports the result of the request
1872 action - Action in the request
1873 keyType - Type of the key added/deleted
1874 peerMacAddress - Peer MAC Address of the key added/deleted
1876 *******************************************************************************/
1877 #define CsrWifiSmeKeyCfmCreate(msg__, dst__, src__, interfaceTag__, status__, action__, keyType__, peerMacAddress__) \
1878 msg__ = kmalloc(sizeof(CsrWifiSmeKeyCfm), GFP_KERNEL); \
1879 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_KEY_CFM, dst__, src__); \
1880 msg__->interfaceTag = (interfaceTag__); \
1881 msg__->status = (status__); \
1882 msg__->action = (action__); \
1883 msg__->keyType = (keyType__); \
1884 msg__->peerMacAddress = (peerMacAddress__);
1886 #define CsrWifiSmeKeyCfmSendTo(dst__, src__, interfaceTag__, status__, action__, keyType__, peerMacAddress__) \
1888 CsrWifiSmeKeyCfm *msg__; \
1889 CsrWifiSmeKeyCfmCreate(msg__, dst__, src__, interfaceTag__, status__, action__, keyType__, peerMacAddress__); \
1890 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1893 #define CsrWifiSmeKeyCfmSend(dst__, interfaceTag__, status__, action__, keyType__, peerMacAddress__) \
1894 CsrWifiSmeKeyCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, action__, keyType__, peerMacAddress__)
1896 /*******************************************************************************
1899 CsrWifiSmeLinkQualityGetReqSend
1902 This primitive gets the value of the LinkQuality parameter.
1905 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
1906 interfaceTag - Interface Identifier; unique identifier of an interface
1908 *******************************************************************************/
1909 #define CsrWifiSmeLinkQualityGetReqCreate(msg__, dst__, src__, interfaceTag__) \
1910 msg__ = kmalloc(sizeof(CsrWifiSmeLinkQualityGetReq), GFP_KERNEL); \
1911 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_LINK_QUALITY_GET_REQ, dst__, src__); \
1912 msg__->interfaceTag = (interfaceTag__);
1914 #define CsrWifiSmeLinkQualityGetReqSendTo(dst__, src__, interfaceTag__) \
1916 CsrWifiSmeLinkQualityGetReq *msg__; \
1917 CsrWifiSmeLinkQualityGetReqCreate(msg__, dst__, src__, interfaceTag__); \
1918 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
1921 #define CsrWifiSmeLinkQualityGetReqSend(src__, interfaceTag__) \
1922 CsrWifiSmeLinkQualityGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__)
1924 /*******************************************************************************
1927 CsrWifiSmeLinkQualityGetCfmSend
1930 This primitive reports the result of the request.
1933 queue - Destination Task Queue
1934 interfaceTag - Interface Identifier; unique identifier of an interface
1935 status - Reports the result of the request
1936 linkQuality - Indicates the quality of the link
1938 *******************************************************************************/
1939 #define CsrWifiSmeLinkQualityGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, linkQuality__) \
1940 msg__ = kmalloc(sizeof(CsrWifiSmeLinkQualityGetCfm), GFP_KERNEL); \
1941 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_LINK_QUALITY_GET_CFM, dst__, src__); \
1942 msg__->interfaceTag = (interfaceTag__); \
1943 msg__->status = (status__); \
1944 msg__->linkQuality = (linkQuality__);
1946 #define CsrWifiSmeLinkQualityGetCfmSendTo(dst__, src__, interfaceTag__, status__, linkQuality__) \
1948 CsrWifiSmeLinkQualityGetCfm *msg__; \
1949 CsrWifiSmeLinkQualityGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, linkQuality__); \
1950 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1953 #define CsrWifiSmeLinkQualityGetCfmSend(dst__, interfaceTag__, status__, linkQuality__) \
1954 CsrWifiSmeLinkQualityGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, linkQuality__)
1956 /*******************************************************************************
1959 CsrWifiSmeMediaStatusIndSend
1962 The SME sends this primitive to all the tasks that have registered to
1963 receive it when a network connection is established, lost or has moved to
1967 queue - Destination Task Queue
1968 interfaceTag - Interface Identifier; unique identifier of an interface
1969 mediaStatus - Indicates the media status
1970 connectionInfo - This parameter is relevant only if the mediaStatus is
1971 CSR_WIFI_SME_MEDIA_STATUS_CONNECTED:
1972 it points to the connection information for the new network
1973 disassocReason - This parameter is relevant only if the mediaStatus is
1974 CSR_WIFI_SME_MEDIA_STATUS_DISCONNECTED:
1975 if a disassociation has occurred it gives the reason of the
1977 deauthReason - This parameter is relevant only if the mediaStatus is
1978 CSR_WIFI_SME_MEDIA_STATUS_DISCONNECTED:
1979 if a deauthentication has occurred it gives the reason of
1980 the deauthentication
1982 *******************************************************************************/
1983 #define CsrWifiSmeMediaStatusIndCreate(msg__, dst__, src__, interfaceTag__, mediaStatus__, connectionInfo__, disassocReason__, deauthReason__) \
1984 msg__ = kmalloc(sizeof(CsrWifiSmeMediaStatusInd), GFP_KERNEL); \
1985 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_MEDIA_STATUS_IND, dst__, src__); \
1986 msg__->interfaceTag = (interfaceTag__); \
1987 msg__->mediaStatus = (mediaStatus__); \
1988 msg__->connectionInfo = (connectionInfo__); \
1989 msg__->disassocReason = (disassocReason__); \
1990 msg__->deauthReason = (deauthReason__);
1992 #define CsrWifiSmeMediaStatusIndSendTo(dst__, src__, interfaceTag__, mediaStatus__, connectionInfo__, disassocReason__, deauthReason__) \
1994 CsrWifiSmeMediaStatusInd *msg__; \
1995 CsrWifiSmeMediaStatusIndCreate(msg__, dst__, src__, interfaceTag__, mediaStatus__, connectionInfo__, disassocReason__, deauthReason__); \
1996 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
1999 #define CsrWifiSmeMediaStatusIndSend(dst__, interfaceTag__, mediaStatus__, connectionInfo__, disassocReason__, deauthReason__) \
2000 CsrWifiSmeMediaStatusIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, mediaStatus__, connectionInfo__, disassocReason__, deauthReason__)
2002 /*******************************************************************************
2005 CsrWifiSmeMibConfigGetReqSend
2008 This primitive gets the value of the MibConfig parameter.
2011 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
2013 *******************************************************************************/
2014 #define CsrWifiSmeMibConfigGetReqCreate(msg__, dst__, src__) \
2015 msg__ = kmalloc(sizeof(CsrWifiSmeMibConfigGetReq), GFP_KERNEL); \
2016 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_MIB_CONFIG_GET_REQ, dst__, src__);
2018 #define CsrWifiSmeMibConfigGetReqSendTo(dst__, src__) \
2020 CsrWifiSmeMibConfigGetReq *msg__; \
2021 CsrWifiSmeMibConfigGetReqCreate(msg__, dst__, src__); \
2022 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
2025 #define CsrWifiSmeMibConfigGetReqSend(src__) \
2026 CsrWifiSmeMibConfigGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
2028 /*******************************************************************************
2031 CsrWifiSmeMibConfigGetCfmSend
2034 This primitive reports the result of the request.
2037 queue - Destination Task Queue
2038 status - Reports the result of the request
2039 mibConfig - Reports various IEEE 802.11 attributes as currently configured
2041 *******************************************************************************/
2042 #define CsrWifiSmeMibConfigGetCfmCreate(msg__, dst__, src__, status__, mibConfig__) \
2043 msg__ = kmalloc(sizeof(CsrWifiSmeMibConfigGetCfm), GFP_KERNEL); \
2044 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_MIB_CONFIG_GET_CFM, dst__, src__); \
2045 msg__->status = (status__); \
2046 msg__->mibConfig = (mibConfig__);
2048 #define CsrWifiSmeMibConfigGetCfmSendTo(dst__, src__, status__, mibConfig__) \
2050 CsrWifiSmeMibConfigGetCfm *msg__; \
2051 CsrWifiSmeMibConfigGetCfmCreate(msg__, dst__, src__, status__, mibConfig__); \
2052 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2055 #define CsrWifiSmeMibConfigGetCfmSend(dst__, status__, mibConfig__) \
2056 CsrWifiSmeMibConfigGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, mibConfig__)
2058 /*******************************************************************************
2061 CsrWifiSmeMibConfigSetReqSend
2064 This primitive sets the value of the MibConfig parameter.
2067 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
2068 mibConfig - Conveys the desired value of various IEEE 802.11 attributes as
2069 currently configured
2071 *******************************************************************************/
2072 #define CsrWifiSmeMibConfigSetReqCreate(msg__, dst__, src__, mibConfig__) \
2073 msg__ = kmalloc(sizeof(CsrWifiSmeMibConfigSetReq), GFP_KERNEL); \
2074 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_MIB_CONFIG_SET_REQ, dst__, src__); \
2075 msg__->mibConfig = (mibConfig__);
2077 #define CsrWifiSmeMibConfigSetReqSendTo(dst__, src__, mibConfig__) \
2079 CsrWifiSmeMibConfigSetReq *msg__; \
2080 CsrWifiSmeMibConfigSetReqCreate(msg__, dst__, src__, mibConfig__); \
2081 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
2084 #define CsrWifiSmeMibConfigSetReqSend(src__, mibConfig__) \
2085 CsrWifiSmeMibConfigSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, mibConfig__)
2087 /*******************************************************************************
2090 CsrWifiSmeMibConfigSetCfmSend
2093 This primitive reports the result of the request.
2096 queue - Destination Task Queue
2097 status - Reports the result of the request
2099 *******************************************************************************/
2100 #define CsrWifiSmeMibConfigSetCfmCreate(msg__, dst__, src__, status__) \
2101 msg__ = kmalloc(sizeof(CsrWifiSmeMibConfigSetCfm), GFP_KERNEL); \
2102 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_MIB_CONFIG_SET_CFM, dst__, src__); \
2103 msg__->status = (status__);
2105 #define CsrWifiSmeMibConfigSetCfmSendTo(dst__, src__, status__) \
2107 CsrWifiSmeMibConfigSetCfm *msg__; \
2108 CsrWifiSmeMibConfigSetCfmCreate(msg__, dst__, src__, status__); \
2109 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2112 #define CsrWifiSmeMibConfigSetCfmSend(dst__, status__) \
2113 CsrWifiSmeMibConfigSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
2115 /*******************************************************************************
2118 CsrWifiSmeMibGetCfmSend
2121 The SME calls this primitive to return the requested MIB variable values.
2124 queue - Destination Task Queue
2125 status - Reports the result of the request
2126 mibAttributeLength - Length of mibAttribute
2127 mibAttribute - Points to the VarBind or VarBindList containing the
2128 names and values of the MIB variables requested
2130 *******************************************************************************/
2131 #define CsrWifiSmeMibGetCfmCreate(msg__, dst__, src__, status__, mibAttributeLength__, mibAttribute__) \
2132 msg__ = kmalloc(sizeof(CsrWifiSmeMibGetCfm), GFP_KERNEL); \
2133 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_MIB_GET_CFM, dst__, src__); \
2134 msg__->status = (status__); \
2135 msg__->mibAttributeLength = (mibAttributeLength__); \
2136 msg__->mibAttribute = (mibAttribute__);
2138 #define CsrWifiSmeMibGetCfmSendTo(dst__, src__, status__, mibAttributeLength__, mibAttribute__) \
2140 CsrWifiSmeMibGetCfm *msg__; \
2141 CsrWifiSmeMibGetCfmCreate(msg__, dst__, src__, status__, mibAttributeLength__, mibAttribute__); \
2142 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2145 #define CsrWifiSmeMibGetCfmSend(dst__, status__, mibAttributeLength__, mibAttribute__) \
2146 CsrWifiSmeMibGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, mibAttributeLength__, mibAttribute__)
2148 /*******************************************************************************
2151 CsrWifiSmeMibGetNextReqSend
2154 To read a sequence of MIB parameters, for example a table, call this
2155 primitive to find the name of the next MIB variable
2158 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
2159 mibAttributeLength - Length of mibAttribute
2160 mibAttribute - Points to a VarBind or VarBindList containing the
2161 name(s) of the MIB variable(s) to search from.
2163 *******************************************************************************/
2164 #define CsrWifiSmeMibGetNextReqCreate(msg__, dst__, src__, mibAttributeLength__, mibAttribute__) \
2165 msg__ = kmalloc(sizeof(CsrWifiSmeMibGetNextReq), GFP_KERNEL); \
2166 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_MIB_GET_NEXT_REQ, dst__, src__); \
2167 msg__->mibAttributeLength = (mibAttributeLength__); \
2168 msg__->mibAttribute = (mibAttribute__);
2170 #define CsrWifiSmeMibGetNextReqSendTo(dst__, src__, mibAttributeLength__, mibAttribute__) \
2172 CsrWifiSmeMibGetNextReq *msg__; \
2173 CsrWifiSmeMibGetNextReqCreate(msg__, dst__, src__, mibAttributeLength__, mibAttribute__); \
2174 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
2177 #define CsrWifiSmeMibGetNextReqSend(src__, mibAttributeLength__, mibAttribute__) \
2178 CsrWifiSmeMibGetNextReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, mibAttributeLength__, mibAttribute__)
2180 /*******************************************************************************
2183 CsrWifiSmeMibGetNextCfmSend
2186 The SME calls this primitive to return the requested MIB name(s).
2187 The wireless manager application can then read the value of the MIB
2188 variable using CSR_WIFI_SME_MIB_GET_REQ, using the names provided.
2191 queue - Destination Task Queue
2192 status - Reports the result of the request
2193 mibAttributeLength - Length of mibAttribute
2194 mibAttribute - Points to a VarBind or VarBindList containing the
2195 name(s) of the MIB variable(s) lexicographically
2196 following the name(s) given in the request
2198 *******************************************************************************/
2199 #define CsrWifiSmeMibGetNextCfmCreate(msg__, dst__, src__, status__, mibAttributeLength__, mibAttribute__) \
2200 msg__ = kmalloc(sizeof(CsrWifiSmeMibGetNextCfm), GFP_KERNEL); \
2201 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_MIB_GET_NEXT_CFM, dst__, src__); \
2202 msg__->status = (status__); \
2203 msg__->mibAttributeLength = (mibAttributeLength__); \
2204 msg__->mibAttribute = (mibAttribute__);
2206 #define CsrWifiSmeMibGetNextCfmSendTo(dst__, src__, status__, mibAttributeLength__, mibAttribute__) \
2208 CsrWifiSmeMibGetNextCfm *msg__; \
2209 CsrWifiSmeMibGetNextCfmCreate(msg__, dst__, src__, status__, mibAttributeLength__, mibAttribute__); \
2210 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2213 #define CsrWifiSmeMibGetNextCfmSend(dst__, status__, mibAttributeLength__, mibAttribute__) \
2214 CsrWifiSmeMibGetNextCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, mibAttributeLength__, mibAttribute__)
2216 /*******************************************************************************
2219 CsrWifiSmeMibGetReqSend
2222 The wireless manager application calls this primitive to retrieve one or
2226 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
2227 mibAttributeLength - Length of mibAttribute
2228 mibAttribute - Points to the VarBind or VarBindList containing the
2229 names of the MIB variables to be retrieved
2231 *******************************************************************************/
2232 #define CsrWifiSmeMibGetReqCreate(msg__, dst__, src__, mibAttributeLength__, mibAttribute__) \
2233 msg__ = kmalloc(sizeof(CsrWifiSmeMibGetReq), GFP_KERNEL); \
2234 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_MIB_GET_REQ, dst__, src__); \
2235 msg__->mibAttributeLength = (mibAttributeLength__); \
2236 msg__->mibAttribute = (mibAttribute__);
2238 #define CsrWifiSmeMibGetReqSendTo(dst__, src__, mibAttributeLength__, mibAttribute__) \
2240 CsrWifiSmeMibGetReq *msg__; \
2241 CsrWifiSmeMibGetReqCreate(msg__, dst__, src__, mibAttributeLength__, mibAttribute__); \
2242 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
2245 #define CsrWifiSmeMibGetReqSend(src__, mibAttributeLength__, mibAttribute__) \
2246 CsrWifiSmeMibGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, mibAttributeLength__, mibAttribute__)
2248 /*******************************************************************************
2251 CsrWifiSmeMibSetReqSend
2254 The SME provides raw access to the MIB on the chip, which may be used by
2255 some configuration or diagnostic utilities, but is not normally needed by
2256 the wireless manager application.
2257 The MIB access functions use BER encoded names (OID) of the MIB
2258 parameters and BER encoded values, as described in the chip Host
2259 Interface Protocol Specification.
2260 The MIB parameters are described in 'Wi-Fi 5.0.0 Management Information
2261 Base Reference Guide'.
2262 The wireless manager application calls this primitive to set one or more
2266 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
2267 mibAttributeLength - Length of mibAttribute
2268 mibAttribute - Points to the VarBind or VarBindList containing the
2269 names and values of the MIB variables to set
2271 *******************************************************************************/
2272 #define CsrWifiSmeMibSetReqCreate(msg__, dst__, src__, mibAttributeLength__, mibAttribute__) \
2273 msg__ = kmalloc(sizeof(CsrWifiSmeMibSetReq), GFP_KERNEL); \
2274 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_MIB_SET_REQ, dst__, src__); \
2275 msg__->mibAttributeLength = (mibAttributeLength__); \
2276 msg__->mibAttribute = (mibAttribute__);
2278 #define CsrWifiSmeMibSetReqSendTo(dst__, src__, mibAttributeLength__, mibAttribute__) \
2280 CsrWifiSmeMibSetReq *msg__; \
2281 CsrWifiSmeMibSetReqCreate(msg__, dst__, src__, mibAttributeLength__, mibAttribute__); \
2282 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
2285 #define CsrWifiSmeMibSetReqSend(src__, mibAttributeLength__, mibAttribute__) \
2286 CsrWifiSmeMibSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, mibAttributeLength__, mibAttribute__)
2288 /*******************************************************************************
2291 CsrWifiSmeMibSetCfmSend
2294 The SME calls the primitive to report the result of the set primitive.
2297 queue - Destination Task Queue
2298 status - Reports the result of the request
2300 *******************************************************************************/
2301 #define CsrWifiSmeMibSetCfmCreate(msg__, dst__, src__, status__) \
2302 msg__ = kmalloc(sizeof(CsrWifiSmeMibSetCfm), GFP_KERNEL); \
2303 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_MIB_SET_CFM, dst__, src__); \
2304 msg__->status = (status__);
2306 #define CsrWifiSmeMibSetCfmSendTo(dst__, src__, status__) \
2308 CsrWifiSmeMibSetCfm *msg__; \
2309 CsrWifiSmeMibSetCfmCreate(msg__, dst__, src__, status__); \
2310 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2313 #define CsrWifiSmeMibSetCfmSend(dst__, status__) \
2314 CsrWifiSmeMibSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
2316 /*******************************************************************************
2319 CsrWifiSmeMicFailureIndSend
2322 The SME sends this primitive to all the tasks that have registered to
2323 receive it whenever the chip firmware reports a MIC failure.
2326 queue - Destination Task Queue
2327 interfaceTag - Interface Identifier; unique identifier of an interface
2328 secondFailure - TRUE if this indication is for a second failure in 60
2330 count - The number of MIC failure events since the connection was
2332 address - MAC address of the transmitter that caused the MIC failure
2333 keyType - Type of key for which the failure occurred
2335 *******************************************************************************/
2336 #define CsrWifiSmeMicFailureIndCreate(msg__, dst__, src__, interfaceTag__, secondFailure__, count__, address__, keyType__) \
2337 msg__ = kmalloc(sizeof(CsrWifiSmeMicFailureInd), GFP_KERNEL); \
2338 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_MIC_FAILURE_IND, dst__, src__); \
2339 msg__->interfaceTag = (interfaceTag__); \
2340 msg__->secondFailure = (secondFailure__); \
2341 msg__->count = (count__); \
2342 msg__->address = (address__); \
2343 msg__->keyType = (keyType__);
2345 #define CsrWifiSmeMicFailureIndSendTo(dst__, src__, interfaceTag__, secondFailure__, count__, address__, keyType__) \
2347 CsrWifiSmeMicFailureInd *msg__; \
2348 CsrWifiSmeMicFailureIndCreate(msg__, dst__, src__, interfaceTag__, secondFailure__, count__, address__, keyType__); \
2349 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2352 #define CsrWifiSmeMicFailureIndSend(dst__, interfaceTag__, secondFailure__, count__, address__, keyType__) \
2353 CsrWifiSmeMicFailureIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, secondFailure__, count__, address__, keyType__)
2355 /*******************************************************************************
2358 CsrWifiSmeMulticastAddressReqSend
2361 The wireless manager application calls this primitive to specify the
2362 multicast addresses which the chip should recognise. The interface allows
2363 the wireless manager application to query, add, remove and flush the
2364 multicast addresses for the network interface according to the specified
2368 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
2369 interfaceTag - Interface Identifier; unique identifier of an interface
2370 action - The value of the CsrWifiSmeListAction parameter
2371 instructs the driver to modify or provide the list of
2373 setAddressesCount - Number of MAC addresses sent with the primitive
2374 setAddresses - Pointer to the list of MAC Addresses sent with the
2375 primitive, set to NULL if none is sent.
2377 *******************************************************************************/
2378 #define CsrWifiSmeMulticastAddressReqCreate(msg__, dst__, src__, interfaceTag__, action__, setAddressesCount__, setAddresses__) \
2379 msg__ = kmalloc(sizeof(CsrWifiSmeMulticastAddressReq), GFP_KERNEL); \
2380 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_MULTICAST_ADDRESS_REQ, dst__, src__); \
2381 msg__->interfaceTag = (interfaceTag__); \
2382 msg__->action = (action__); \
2383 msg__->setAddressesCount = (setAddressesCount__); \
2384 msg__->setAddresses = (setAddresses__);
2386 #define CsrWifiSmeMulticastAddressReqSendTo(dst__, src__, interfaceTag__, action__, setAddressesCount__, setAddresses__) \
2388 CsrWifiSmeMulticastAddressReq *msg__; \
2389 CsrWifiSmeMulticastAddressReqCreate(msg__, dst__, src__, interfaceTag__, action__, setAddressesCount__, setAddresses__); \
2390 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
2393 #define CsrWifiSmeMulticastAddressReqSend(src__, interfaceTag__, action__, setAddressesCount__, setAddresses__) \
2394 CsrWifiSmeMulticastAddressReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__, action__, setAddressesCount__, setAddresses__)
2396 /*******************************************************************************
2399 CsrWifiSmeMulticastAddressCfmSend
2402 The SME will call this primitive when the operation is complete. For a
2403 GET action, this primitive reports the current list of MAC addresses.
2406 queue - Destination Task Queue
2407 interfaceTag - Interface Identifier; unique identifier of an interface
2408 status - Reports the result of the request
2409 action - Action in the request
2410 getAddressesCount - This parameter is only relevant if action is
2411 CSR_WIFI_SME_LIST_ACTION_GET:
2412 number of MAC addresses sent with the primitive
2413 getAddresses - Pointer to the list of MAC Addresses sent with the
2414 primitive, set to NULL if none is sent.
2416 *******************************************************************************/
2417 #define CsrWifiSmeMulticastAddressCfmCreate(msg__, dst__, src__, interfaceTag__, status__, action__, getAddressesCount__, getAddresses__) \
2418 msg__ = kmalloc(sizeof(CsrWifiSmeMulticastAddressCfm), GFP_KERNEL); \
2419 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_MULTICAST_ADDRESS_CFM, dst__, src__); \
2420 msg__->interfaceTag = (interfaceTag__); \
2421 msg__->status = (status__); \
2422 msg__->action = (action__); \
2423 msg__->getAddressesCount = (getAddressesCount__); \
2424 msg__->getAddresses = (getAddresses__);
2426 #define CsrWifiSmeMulticastAddressCfmSendTo(dst__, src__, interfaceTag__, status__, action__, getAddressesCount__, getAddresses__) \
2428 CsrWifiSmeMulticastAddressCfm *msg__; \
2429 CsrWifiSmeMulticastAddressCfmCreate(msg__, dst__, src__, interfaceTag__, status__, action__, getAddressesCount__, getAddresses__); \
2430 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2433 #define CsrWifiSmeMulticastAddressCfmSend(dst__, interfaceTag__, status__, action__, getAddressesCount__, getAddresses__) \
2434 CsrWifiSmeMulticastAddressCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, action__, getAddressesCount__, getAddresses__)
2436 /*******************************************************************************
2439 CsrWifiSmePacketFilterSetReqSend
2442 The wireless manager application should call this primitive to enable or
2443 disable filtering of broadcast packets: uninteresting broadcast packets
2444 will be dropped by the Wi-Fi chip, instead of passing them up to the
2446 This has the advantage of saving power in the host application processor
2447 as it removes the need to process unwanted packets.
2448 All broadcast packets are filtered according to the filter and the filter
2449 mode provided, except ARP packets, which are filtered using
2451 Filters are not cumulative: only the parameters specified in the most
2452 recent successful request are significant.
2453 For more information, see 'UniFi Firmware API Specification'.
2456 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
2457 interfaceTag - Interface Identifier; unique identifier of an interface
2458 filterLength - Length of the filter in bytes.
2459 filterLength=0 disables the filter previously set
2460 filter - Points to the first byte of the filter provided, if any.
2461 This shall include zero or more instance of the
2462 information elements of one of these types
2463 * Traffic Classification (TCLAS) elements
2464 * WMM-SA TCLAS elements
2465 mode - Specifies whether the filter selects or excludes packets
2467 arpFilterAddress - IPv4 address to be used for filtering the ARP packets.
2468 * If the specified address is the IPv4 broadcast address
2469 (255.255.255.255), all ARP packets are reported to the
2471 * If the specified address is NOT the IPv4 broadcast
2472 address, only ARP packets with the specified address in
2473 the Source or Target Protocol Address fields are reported
2476 *******************************************************************************/
2477 #define CsrWifiSmePacketFilterSetReqCreate(msg__, dst__, src__, interfaceTag__, filterLength__, filter__, mode__, arpFilterAddress__) \
2478 msg__ = kmalloc(sizeof(CsrWifiSmePacketFilterSetReq), GFP_KERNEL); \
2479 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_PACKET_FILTER_SET_REQ, dst__, src__); \
2480 msg__->interfaceTag = (interfaceTag__); \
2481 msg__->filterLength = (filterLength__); \
2482 msg__->filter = (filter__); \
2483 msg__->mode = (mode__); \
2484 msg__->arpFilterAddress = (arpFilterAddress__);
2486 #define CsrWifiSmePacketFilterSetReqSendTo(dst__, src__, interfaceTag__, filterLength__, filter__, mode__, arpFilterAddress__) \
2488 CsrWifiSmePacketFilterSetReq *msg__; \
2489 CsrWifiSmePacketFilterSetReqCreate(msg__, dst__, src__, interfaceTag__, filterLength__, filter__, mode__, arpFilterAddress__); \
2490 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
2493 #define CsrWifiSmePacketFilterSetReqSend(src__, interfaceTag__, filterLength__, filter__, mode__, arpFilterAddress__) \
2494 CsrWifiSmePacketFilterSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__, filterLength__, filter__, mode__, arpFilterAddress__)
2496 /*******************************************************************************
2499 CsrWifiSmePacketFilterSetCfmSend
2502 The SME calls the primitive to report the result of the set primitive.
2505 queue - Destination Task Queue
2506 interfaceTag - Interface Identifier; unique identifier of an interface
2507 status - Reports the result of the request
2509 *******************************************************************************/
2510 #define CsrWifiSmePacketFilterSetCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
2511 msg__ = kmalloc(sizeof(CsrWifiSmePacketFilterSetCfm), GFP_KERNEL); \
2512 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_PACKET_FILTER_SET_CFM, dst__, src__); \
2513 msg__->interfaceTag = (interfaceTag__); \
2514 msg__->status = (status__);
2516 #define CsrWifiSmePacketFilterSetCfmSendTo(dst__, src__, interfaceTag__, status__) \
2518 CsrWifiSmePacketFilterSetCfm *msg__; \
2519 CsrWifiSmePacketFilterSetCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
2520 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2523 #define CsrWifiSmePacketFilterSetCfmSend(dst__, interfaceTag__, status__) \
2524 CsrWifiSmePacketFilterSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
2526 /*******************************************************************************
2529 CsrWifiSmePermanentMacAddressGetReqSend
2532 This primitive retrieves the MAC address stored in EEPROM
2535 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
2537 *******************************************************************************/
2538 #define CsrWifiSmePermanentMacAddressGetReqCreate(msg__, dst__, src__) \
2539 msg__ = kmalloc(sizeof(CsrWifiSmePermanentMacAddressGetReq), GFP_KERNEL); \
2540 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_PERMANENT_MAC_ADDRESS_GET_REQ, dst__, src__);
2542 #define CsrWifiSmePermanentMacAddressGetReqSendTo(dst__, src__) \
2544 CsrWifiSmePermanentMacAddressGetReq *msg__; \
2545 CsrWifiSmePermanentMacAddressGetReqCreate(msg__, dst__, src__); \
2546 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
2549 #define CsrWifiSmePermanentMacAddressGetReqSend(src__) \
2550 CsrWifiSmePermanentMacAddressGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
2552 /*******************************************************************************
2555 CsrWifiSmePermanentMacAddressGetCfmSend
2558 This primitive reports the result of the request.
2561 queue - Destination Task Queue
2562 status - Reports the result of the request
2563 permanentMacAddress - MAC address stored in the EEPROM
2565 *******************************************************************************/
2566 #define CsrWifiSmePermanentMacAddressGetCfmCreate(msg__, dst__, src__, status__, permanentMacAddress__) \
2567 msg__ = kmalloc(sizeof(CsrWifiSmePermanentMacAddressGetCfm), GFP_KERNEL); \
2568 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_PERMANENT_MAC_ADDRESS_GET_CFM, dst__, src__); \
2569 msg__->status = (status__); \
2570 msg__->permanentMacAddress = (permanentMacAddress__);
2572 #define CsrWifiSmePermanentMacAddressGetCfmSendTo(dst__, src__, status__, permanentMacAddress__) \
2574 CsrWifiSmePermanentMacAddressGetCfm *msg__; \
2575 CsrWifiSmePermanentMacAddressGetCfmCreate(msg__, dst__, src__, status__, permanentMacAddress__); \
2576 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2579 #define CsrWifiSmePermanentMacAddressGetCfmSend(dst__, status__, permanentMacAddress__) \
2580 CsrWifiSmePermanentMacAddressGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, permanentMacAddress__)
2582 /*******************************************************************************
2585 CsrWifiSmePmkidCandidateListIndSend
2588 The SME will send this primitive to all the tasks that have registered to
2589 receive it when a new network supporting preauthentication and/or PMK
2593 queue - Destination Task Queue
2594 interfaceTag - Interface Identifier; unique identifier of an
2596 pmkidCandidatesCount - Number of PMKID candidates provided
2597 pmkidCandidates - Points to the first PMKID candidate
2599 *******************************************************************************/
2600 #define CsrWifiSmePmkidCandidateListIndCreate(msg__, dst__, src__, interfaceTag__, pmkidCandidatesCount__, pmkidCandidates__) \
2601 msg__ = kmalloc(sizeof(CsrWifiSmePmkidCandidateListInd), GFP_KERNEL); \
2602 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_PMKID_CANDIDATE_LIST_IND, dst__, src__); \
2603 msg__->interfaceTag = (interfaceTag__); \
2604 msg__->pmkidCandidatesCount = (pmkidCandidatesCount__); \
2605 msg__->pmkidCandidates = (pmkidCandidates__);
2607 #define CsrWifiSmePmkidCandidateListIndSendTo(dst__, src__, interfaceTag__, pmkidCandidatesCount__, pmkidCandidates__) \
2609 CsrWifiSmePmkidCandidateListInd *msg__; \
2610 CsrWifiSmePmkidCandidateListIndCreate(msg__, dst__, src__, interfaceTag__, pmkidCandidatesCount__, pmkidCandidates__); \
2611 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2614 #define CsrWifiSmePmkidCandidateListIndSend(dst__, interfaceTag__, pmkidCandidatesCount__, pmkidCandidates__) \
2615 CsrWifiSmePmkidCandidateListIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, pmkidCandidatesCount__, pmkidCandidates__)
2617 /*******************************************************************************
2620 CsrWifiSmePmkidReqSend
2623 The wireless manager application calls this primitive to request an
2624 operation on the SME PMKID list.
2625 The action argument specifies the operation to perform.
2626 When the connection is complete, the wireless manager application may
2627 then send and receive EAPOL packets to complete WPA or WPA2
2628 authentication if appropriate.
2629 The wireless manager application can then pass the resulting encryption
2630 keys using this primitive.
2633 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
2634 interfaceTag - Interface Identifier; unique identifier of an interface
2635 action - The value of the CsrWifiSmeListAction parameter instructs
2636 the driver to modify or provide the list of PMKIDs.
2637 setPmkidsCount - Number of PMKIDs sent with the primitive
2638 setPmkids - Pointer to the list of PMKIDs sent with the primitive, set
2639 to NULL if none is sent.
2641 *******************************************************************************/
2642 #define CsrWifiSmePmkidReqCreate(msg__, dst__, src__, interfaceTag__, action__, setPmkidsCount__, setPmkids__) \
2643 msg__ = kmalloc(sizeof(CsrWifiSmePmkidReq), GFP_KERNEL); \
2644 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_PMKID_REQ, dst__, src__); \
2645 msg__->interfaceTag = (interfaceTag__); \
2646 msg__->action = (action__); \
2647 msg__->setPmkidsCount = (setPmkidsCount__); \
2648 msg__->setPmkids = (setPmkids__);
2650 #define CsrWifiSmePmkidReqSendTo(dst__, src__, interfaceTag__, action__, setPmkidsCount__, setPmkids__) \
2652 CsrWifiSmePmkidReq *msg__; \
2653 CsrWifiSmePmkidReqCreate(msg__, dst__, src__, interfaceTag__, action__, setPmkidsCount__, setPmkids__); \
2654 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
2657 #define CsrWifiSmePmkidReqSend(src__, interfaceTag__, action__, setPmkidsCount__, setPmkids__) \
2658 CsrWifiSmePmkidReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__, action__, setPmkidsCount__, setPmkids__)
2660 /*******************************************************************************
2663 CsrWifiSmePmkidCfmSend
2666 The SME will call this primitive when the operation is complete. For a
2667 GET action, this primitive reports the current list of PMKIDs
2670 queue - Destination Task Queue
2671 interfaceTag - Interface Identifier; unique identifier of an interface
2672 status - Reports the result of the request
2673 action - Action in the request
2674 getPmkidsCount - This parameter is only relevant if action is
2675 CSR_WIFI_SME_LIST_ACTION_GET:
2676 number of PMKIDs sent with the primitive
2677 getPmkids - Pointer to the list of PMKIDs sent with the primitive, set
2678 to NULL if none is sent.
2680 *******************************************************************************/
2681 #define CsrWifiSmePmkidCfmCreate(msg__, dst__, src__, interfaceTag__, status__, action__, getPmkidsCount__, getPmkids__) \
2682 msg__ = kmalloc(sizeof(CsrWifiSmePmkidCfm), GFP_KERNEL); \
2683 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_PMKID_CFM, dst__, src__); \
2684 msg__->interfaceTag = (interfaceTag__); \
2685 msg__->status = (status__); \
2686 msg__->action = (action__); \
2687 msg__->getPmkidsCount = (getPmkidsCount__); \
2688 msg__->getPmkids = (getPmkids__);
2690 #define CsrWifiSmePmkidCfmSendTo(dst__, src__, interfaceTag__, status__, action__, getPmkidsCount__, getPmkids__) \
2692 CsrWifiSmePmkidCfm *msg__; \
2693 CsrWifiSmePmkidCfmCreate(msg__, dst__, src__, interfaceTag__, status__, action__, getPmkidsCount__, getPmkids__); \
2694 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2697 #define CsrWifiSmePmkidCfmSend(dst__, interfaceTag__, status__, action__, getPmkidsCount__, getPmkids__) \
2698 CsrWifiSmePmkidCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, action__, getPmkidsCount__, getPmkids__)
2700 /*******************************************************************************
2703 CsrWifiSmePowerConfigGetReqSend
2706 This primitive gets the value of the PowerConfig parameter.
2709 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
2711 *******************************************************************************/
2712 #define CsrWifiSmePowerConfigGetReqCreate(msg__, dst__, src__) \
2713 msg__ = kmalloc(sizeof(CsrWifiSmePowerConfigGetReq), GFP_KERNEL); \
2714 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_POWER_CONFIG_GET_REQ, dst__, src__);
2716 #define CsrWifiSmePowerConfigGetReqSendTo(dst__, src__) \
2718 CsrWifiSmePowerConfigGetReq *msg__; \
2719 CsrWifiSmePowerConfigGetReqCreate(msg__, dst__, src__); \
2720 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
2723 #define CsrWifiSmePowerConfigGetReqSend(src__) \
2724 CsrWifiSmePowerConfigGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
2726 /*******************************************************************************
2729 CsrWifiSmePowerConfigGetCfmSend
2732 This primitive reports the result of the request.
2735 queue - Destination Task Queue
2736 status - Reports the result of the request
2737 powerConfig - Returns the current parameters for the power configuration of
2740 *******************************************************************************/
2741 #define CsrWifiSmePowerConfigGetCfmCreate(msg__, dst__, src__, status__, powerConfig__) \
2742 msg__ = kmalloc(sizeof(CsrWifiSmePowerConfigGetCfm), GFP_KERNEL); \
2743 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_POWER_CONFIG_GET_CFM, dst__, src__); \
2744 msg__->status = (status__); \
2745 msg__->powerConfig = (powerConfig__);
2747 #define CsrWifiSmePowerConfigGetCfmSendTo(dst__, src__, status__, powerConfig__) \
2749 CsrWifiSmePowerConfigGetCfm *msg__; \
2750 CsrWifiSmePowerConfigGetCfmCreate(msg__, dst__, src__, status__, powerConfig__); \
2751 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2754 #define CsrWifiSmePowerConfigGetCfmSend(dst__, status__, powerConfig__) \
2755 CsrWifiSmePowerConfigGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, powerConfig__)
2757 /*******************************************************************************
2760 CsrWifiSmePowerConfigSetReqSend
2763 This primitive sets the value of the PowerConfig parameter.
2766 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
2767 powerConfig - Power saving configuration
2769 *******************************************************************************/
2770 #define CsrWifiSmePowerConfigSetReqCreate(msg__, dst__, src__, powerConfig__) \
2771 msg__ = kmalloc(sizeof(CsrWifiSmePowerConfigSetReq), GFP_KERNEL); \
2772 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_POWER_CONFIG_SET_REQ, dst__, src__); \
2773 msg__->powerConfig = (powerConfig__);
2775 #define CsrWifiSmePowerConfigSetReqSendTo(dst__, src__, powerConfig__) \
2777 CsrWifiSmePowerConfigSetReq *msg__; \
2778 CsrWifiSmePowerConfigSetReqCreate(msg__, dst__, src__, powerConfig__); \
2779 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
2782 #define CsrWifiSmePowerConfigSetReqSend(src__, powerConfig__) \
2783 CsrWifiSmePowerConfigSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, powerConfig__)
2785 /*******************************************************************************
2788 CsrWifiSmePowerConfigSetCfmSend
2791 This primitive reports the result of the request.
2794 queue - Destination Task Queue
2795 status - Reports the result of the request
2797 *******************************************************************************/
2798 #define CsrWifiSmePowerConfigSetCfmCreate(msg__, dst__, src__, status__) \
2799 msg__ = kmalloc(sizeof(CsrWifiSmePowerConfigSetCfm), GFP_KERNEL); \
2800 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_POWER_CONFIG_SET_CFM, dst__, src__); \
2801 msg__->status = (status__);
2803 #define CsrWifiSmePowerConfigSetCfmSendTo(dst__, src__, status__) \
2805 CsrWifiSmePowerConfigSetCfm *msg__; \
2806 CsrWifiSmePowerConfigSetCfmCreate(msg__, dst__, src__, status__); \
2807 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2810 #define CsrWifiSmePowerConfigSetCfmSend(dst__, status__) \
2811 CsrWifiSmePowerConfigSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
2813 /*******************************************************************************
2816 CsrWifiSmeRegulatoryDomainInfoGetReqSend
2819 This primitive gets the value of the RegulatoryDomainInfo parameter.
2822 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
2824 *******************************************************************************/
2825 #define CsrWifiSmeRegulatoryDomainInfoGetReqCreate(msg__, dst__, src__) \
2826 msg__ = kmalloc(sizeof(CsrWifiSmeRegulatoryDomainInfoGetReq), GFP_KERNEL); \
2827 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_REGULATORY_DOMAIN_INFO_GET_REQ, dst__, src__);
2829 #define CsrWifiSmeRegulatoryDomainInfoGetReqSendTo(dst__, src__) \
2831 CsrWifiSmeRegulatoryDomainInfoGetReq *msg__; \
2832 CsrWifiSmeRegulatoryDomainInfoGetReqCreate(msg__, dst__, src__); \
2833 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
2836 #define CsrWifiSmeRegulatoryDomainInfoGetReqSend(src__) \
2837 CsrWifiSmeRegulatoryDomainInfoGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
2839 /*******************************************************************************
2842 CsrWifiSmeRegulatoryDomainInfoGetCfmSend
2845 This primitive reports the result of the request.
2848 queue - Destination Task Queue
2849 status - Reports the result of the request
2850 regDomInfo - Reports information and state related to regulatory domain
2853 *******************************************************************************/
2854 #define CsrWifiSmeRegulatoryDomainInfoGetCfmCreate(msg__, dst__, src__, status__, regDomInfo__) \
2855 msg__ = kmalloc(sizeof(CsrWifiSmeRegulatoryDomainInfoGetCfm), GFP_KERNEL); \
2856 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_REGULATORY_DOMAIN_INFO_GET_CFM, dst__, src__); \
2857 msg__->status = (status__); \
2858 msg__->regDomInfo = (regDomInfo__);
2860 #define CsrWifiSmeRegulatoryDomainInfoGetCfmSendTo(dst__, src__, status__, regDomInfo__) \
2862 CsrWifiSmeRegulatoryDomainInfoGetCfm *msg__; \
2863 CsrWifiSmeRegulatoryDomainInfoGetCfmCreate(msg__, dst__, src__, status__, regDomInfo__); \
2864 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2867 #define CsrWifiSmeRegulatoryDomainInfoGetCfmSend(dst__, status__, regDomInfo__) \
2868 CsrWifiSmeRegulatoryDomainInfoGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, regDomInfo__)
2870 /*******************************************************************************
2873 CsrWifiSmeRoamCompleteIndSend
2876 The SME will send this primitive to all the tasks that have registered to
2877 receive it whenever it completes an attempt to roam to an AP. If the roam
2878 attempt was successful, status will be set to CSR_WIFI_SME_SUCCESS,
2879 otherwise it shall be set to the appropriate error code.
2882 queue - Destination Task Queue
2883 interfaceTag - Interface Identifier; unique identifier of an interface
2884 status - Reports the result of the roaming procedure
2886 *******************************************************************************/
2887 #define CsrWifiSmeRoamCompleteIndCreate(msg__, dst__, src__, interfaceTag__, status__) \
2888 msg__ = kmalloc(sizeof(CsrWifiSmeRoamCompleteInd), GFP_KERNEL); \
2889 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ROAM_COMPLETE_IND, dst__, src__); \
2890 msg__->interfaceTag = (interfaceTag__); \
2891 msg__->status = (status__);
2893 #define CsrWifiSmeRoamCompleteIndSendTo(dst__, src__, interfaceTag__, status__) \
2895 CsrWifiSmeRoamCompleteInd *msg__; \
2896 CsrWifiSmeRoamCompleteIndCreate(msg__, dst__, src__, interfaceTag__, status__); \
2897 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2900 #define CsrWifiSmeRoamCompleteIndSend(dst__, interfaceTag__, status__) \
2901 CsrWifiSmeRoamCompleteIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
2903 /*******************************************************************************
2906 CsrWifiSmeRoamStartIndSend
2909 The SME will send this primitive to all the tasks that have registered to
2910 receive it whenever it begins an attempt to roam to an AP.
2911 If the wireless manager application connect request specified the SSID
2912 and the BSSID was set to the broadcast address (0xFF 0xFF 0xFF 0xFF 0xFF
2913 0xFF), the SME monitors the signal quality and maintains a list of
2914 candidates to roam to. When the signal quality of the current connection
2915 falls below a threshold, and there is a candidate with better quality,
2916 the SME will attempt to the candidate AP.
2917 If the roaming procedure succeeds, the SME will also issue a Media
2918 Connect indication to inform the wireless manager application of the
2920 NOTE: to prevent the SME from initiating roaming the WMA must specify the
2921 BSSID in the connection request; this forces the SME to connect only to
2923 The wireless manager application can obtain statistics for roaming
2924 purposes using CSR_WIFI_SME_CONNECTION_QUALITY_IND and
2925 CSR_WIFI_SME_CONNECTION_STATS_GET_REQ.
2926 When the wireless manager application wishes to roam to another AP, it
2927 must issue a connection request specifying the BSSID of the desired AP.
2930 queue - Destination Task Queue
2931 interfaceTag - Interface Identifier; unique identifier of an interface
2932 roamReason - Indicates the reason for starting the roaming procedure
2933 reason80211 - Indicates the reason for deauthentication or disassociation
2935 *******************************************************************************/
2936 #define CsrWifiSmeRoamStartIndCreate(msg__, dst__, src__, interfaceTag__, roamReason__, reason80211__) \
2937 msg__ = kmalloc(sizeof(CsrWifiSmeRoamStartInd), GFP_KERNEL); \
2938 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ROAM_START_IND, dst__, src__); \
2939 msg__->interfaceTag = (interfaceTag__); \
2940 msg__->roamReason = (roamReason__); \
2941 msg__->reason80211 = (reason80211__);
2943 #define CsrWifiSmeRoamStartIndSendTo(dst__, src__, interfaceTag__, roamReason__, reason80211__) \
2945 CsrWifiSmeRoamStartInd *msg__; \
2946 CsrWifiSmeRoamStartIndCreate(msg__, dst__, src__, interfaceTag__, roamReason__, reason80211__); \
2947 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
2950 #define CsrWifiSmeRoamStartIndSend(dst__, interfaceTag__, roamReason__, reason80211__) \
2951 CsrWifiSmeRoamStartIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, roamReason__, reason80211__)
2953 /*******************************************************************************
2956 CsrWifiSmeRoamingConfigGetReqSend
2959 This primitive gets the value of the RoamingConfig parameter.
2962 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
2963 interfaceTag - Interface Identifier; unique identifier of an interface
2965 *******************************************************************************/
2966 #define CsrWifiSmeRoamingConfigGetReqCreate(msg__, dst__, src__, interfaceTag__) \
2967 msg__ = kmalloc(sizeof(CsrWifiSmeRoamingConfigGetReq), GFP_KERNEL); \
2968 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ROAMING_CONFIG_GET_REQ, dst__, src__); \
2969 msg__->interfaceTag = (interfaceTag__);
2971 #define CsrWifiSmeRoamingConfigGetReqSendTo(dst__, src__, interfaceTag__) \
2973 CsrWifiSmeRoamingConfigGetReq *msg__; \
2974 CsrWifiSmeRoamingConfigGetReqCreate(msg__, dst__, src__, interfaceTag__); \
2975 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
2978 #define CsrWifiSmeRoamingConfigGetReqSend(src__, interfaceTag__) \
2979 CsrWifiSmeRoamingConfigGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__)
2981 /*******************************************************************************
2984 CsrWifiSmeRoamingConfigGetCfmSend
2987 This primitive reports the result of the request.
2990 queue - Destination Task Queue
2991 interfaceTag - Interface Identifier; unique identifier of an interface
2992 status - Reports the result of the request
2993 roamingConfig - Reports the roaming behaviour of the driver and firmware
2995 *******************************************************************************/
2996 #define CsrWifiSmeRoamingConfigGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, roamingConfig__) \
2997 msg__ = kmalloc(sizeof(CsrWifiSmeRoamingConfigGetCfm), GFP_KERNEL); \
2998 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ROAMING_CONFIG_GET_CFM, dst__, src__); \
2999 msg__->interfaceTag = (interfaceTag__); \
3000 msg__->status = (status__); \
3001 msg__->roamingConfig = (roamingConfig__);
3003 #define CsrWifiSmeRoamingConfigGetCfmSendTo(dst__, src__, interfaceTag__, status__, roamingConfig__) \
3005 CsrWifiSmeRoamingConfigGetCfm *msg__; \
3006 CsrWifiSmeRoamingConfigGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, roamingConfig__); \
3007 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3010 #define CsrWifiSmeRoamingConfigGetCfmSend(dst__, interfaceTag__, status__, roamingConfig__) \
3011 CsrWifiSmeRoamingConfigGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, roamingConfig__)
3013 /*******************************************************************************
3016 CsrWifiSmeRoamingConfigSetReqSend
3019 This primitive sets the value of the RoamingConfig parameter.
3022 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3023 interfaceTag - Interface Identifier; unique identifier of an interface
3024 roamingConfig - Desired roaming behaviour values
3026 *******************************************************************************/
3027 #define CsrWifiSmeRoamingConfigSetReqCreate(msg__, dst__, src__, interfaceTag__, roamingConfig__) \
3028 msg__ = kmalloc(sizeof(CsrWifiSmeRoamingConfigSetReq), GFP_KERNEL); \
3029 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ROAMING_CONFIG_SET_REQ, dst__, src__); \
3030 msg__->interfaceTag = (interfaceTag__); \
3031 msg__->roamingConfig = (roamingConfig__);
3033 #define CsrWifiSmeRoamingConfigSetReqSendTo(dst__, src__, interfaceTag__, roamingConfig__) \
3035 CsrWifiSmeRoamingConfigSetReq *msg__; \
3036 CsrWifiSmeRoamingConfigSetReqCreate(msg__, dst__, src__, interfaceTag__, roamingConfig__); \
3037 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
3040 #define CsrWifiSmeRoamingConfigSetReqSend(src__, interfaceTag__, roamingConfig__) \
3041 CsrWifiSmeRoamingConfigSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__, roamingConfig__)
3043 /*******************************************************************************
3046 CsrWifiSmeRoamingConfigSetCfmSend
3049 This primitive sets the value of the RoamingConfig parameter.
3052 queue - Destination Task Queue
3053 interfaceTag - Interface Identifier; unique identifier of an interface
3054 status - Reports the result of the request
3056 *******************************************************************************/
3057 #define CsrWifiSmeRoamingConfigSetCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
3058 msg__ = kmalloc(sizeof(CsrWifiSmeRoamingConfigSetCfm), GFP_KERNEL); \
3059 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_ROAMING_CONFIG_SET_CFM, dst__, src__); \
3060 msg__->interfaceTag = (interfaceTag__); \
3061 msg__->status = (status__);
3063 #define CsrWifiSmeRoamingConfigSetCfmSendTo(dst__, src__, interfaceTag__, status__) \
3065 CsrWifiSmeRoamingConfigSetCfm *msg__; \
3066 CsrWifiSmeRoamingConfigSetCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
3067 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3070 #define CsrWifiSmeRoamingConfigSetCfmSend(dst__, interfaceTag__, status__) \
3071 CsrWifiSmeRoamingConfigSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
3073 /*******************************************************************************
3076 CsrWifiSmeScanConfigGetReqSend
3079 This primitive gets the value of the ScanConfig parameter.
3082 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3084 *******************************************************************************/
3085 #define CsrWifiSmeScanConfigGetReqCreate(msg__, dst__, src__) \
3086 msg__ = kmalloc(sizeof(CsrWifiSmeScanConfigGetReq), GFP_KERNEL); \
3087 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SCAN_CONFIG_GET_REQ, dst__, src__);
3089 #define CsrWifiSmeScanConfigGetReqSendTo(dst__, src__) \
3091 CsrWifiSmeScanConfigGetReq *msg__; \
3092 CsrWifiSmeScanConfigGetReqCreate(msg__, dst__, src__); \
3093 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
3096 #define CsrWifiSmeScanConfigGetReqSend(src__) \
3097 CsrWifiSmeScanConfigGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
3099 /*******************************************************************************
3102 CsrWifiSmeScanConfigGetCfmSend
3105 This primitive reports the result of the request.
3108 queue - Destination Task Queue
3109 status - Reports the result of the request
3110 scanConfig - Returns the current parameters for the autonomous scanning
3111 behaviour of the firmware
3113 *******************************************************************************/
3114 #define CsrWifiSmeScanConfigGetCfmCreate(msg__, dst__, src__, status__, scanConfig__) \
3115 msg__ = kmalloc(sizeof(CsrWifiSmeScanConfigGetCfm), GFP_KERNEL); \
3116 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SCAN_CONFIG_GET_CFM, dst__, src__); \
3117 msg__->status = (status__); \
3118 msg__->scanConfig = (scanConfig__);
3120 #define CsrWifiSmeScanConfigGetCfmSendTo(dst__, src__, status__, scanConfig__) \
3122 CsrWifiSmeScanConfigGetCfm *msg__; \
3123 CsrWifiSmeScanConfigGetCfmCreate(msg__, dst__, src__, status__, scanConfig__); \
3124 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3127 #define CsrWifiSmeScanConfigGetCfmSend(dst__, status__, scanConfig__) \
3128 CsrWifiSmeScanConfigGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, scanConfig__)
3130 /*******************************************************************************
3133 CsrWifiSmeScanConfigSetReqSend
3136 This primitive sets the value of the ScanConfig parameter.
3137 The SME normally configures the firmware to perform autonomous scanning
3138 without involving the host.
3139 The firmware passes beacon / probe response or indicates loss of beacon
3140 on certain changes of state, for example:
3141 * A new AP is seen for the first time
3142 * An AP is no longer visible
3143 * The signal strength of an AP changes by more than a certain amount, as
3144 configured by the thresholds in the scanConfig parameter
3145 In addition to the autonomous scan, the wireless manager application may
3146 request a scan at any time using CSR_WIFI_SME_SCAN_FULL_REQ.
3149 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3150 scanConfig - Reports the configuration for the autonomous scanning behaviour
3153 *******************************************************************************/
3154 #define CsrWifiSmeScanConfigSetReqCreate(msg__, dst__, src__, scanConfig__) \
3155 msg__ = kmalloc(sizeof(CsrWifiSmeScanConfigSetReq), GFP_KERNEL); \
3156 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SCAN_CONFIG_SET_REQ, dst__, src__); \
3157 msg__->scanConfig = (scanConfig__);
3159 #define CsrWifiSmeScanConfigSetReqSendTo(dst__, src__, scanConfig__) \
3161 CsrWifiSmeScanConfigSetReq *msg__; \
3162 CsrWifiSmeScanConfigSetReqCreate(msg__, dst__, src__, scanConfig__); \
3163 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
3166 #define CsrWifiSmeScanConfigSetReqSend(src__, scanConfig__) \
3167 CsrWifiSmeScanConfigSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, scanConfig__)
3169 /*******************************************************************************
3172 CsrWifiSmeScanConfigSetCfmSend
3175 This primitive reports the result of the request.
3178 queue - Destination Task Queue
3179 status - Reports the result of the request
3181 *******************************************************************************/
3182 #define CsrWifiSmeScanConfigSetCfmCreate(msg__, dst__, src__, status__) \
3183 msg__ = kmalloc(sizeof(CsrWifiSmeScanConfigSetCfm), GFP_KERNEL); \
3184 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SCAN_CONFIG_SET_CFM, dst__, src__); \
3185 msg__->status = (status__);
3187 #define CsrWifiSmeScanConfigSetCfmSendTo(dst__, src__, status__) \
3189 CsrWifiSmeScanConfigSetCfm *msg__; \
3190 CsrWifiSmeScanConfigSetCfmCreate(msg__, dst__, src__, status__); \
3191 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3194 #define CsrWifiSmeScanConfigSetCfmSend(dst__, status__) \
3195 CsrWifiSmeScanConfigSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
3197 /*******************************************************************************
3200 CsrWifiSmeScanFullReqSend
3203 The wireless manager application should call this primitive to request a
3205 Channels are scanned actively or passively according to the requirement
3206 set by regulatory domain.
3207 If the SME receives this primitive while a full scan is going on, the new
3208 request is buffered and it will be served after the current full scan is
3212 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3213 ssidCount - Number of SSIDs provided.
3214 If it is 0, the SME will attempt to detect any network
3215 ssid - Points to the first SSID provided, if any.
3216 bssid - BSS identifier.
3217 If it is equal to FF-FF-FF-FF-FF, the SME will listen for
3218 messages from any BSS.
3219 If it is different from FF-FF-FF-FF-FF and any SSID is
3220 provided, one SSID must match the network of the BSS.
3221 forceScan - Forces the scan even if the SME is in a state which would
3222 normally prevent it (e.g. autonomous scan is running).
3223 bssType - Type of BSS to scan for
3224 scanType - Type of scan to perform
3225 channelListCount - Number of channels provided.
3226 If it is 0, the SME will initiate a scan of all the
3227 supported channels that are permitted by the current
3229 channelList - Points to the first channel , or NULL if channelListCount
3231 probeIeLength - Length of the information element in bytes to be sent
3232 with the probe message.
3233 probeIe - Points to the first byte of the information element to be
3234 sent with the probe message.
3236 *******************************************************************************/
3237 #define CsrWifiSmeScanFullReqCreate(msg__, dst__, src__, ssidCount__, ssid__, bssid__, forceScan__, bssType__, scanType__, channelListCount__, channelList__, probeIeLength__, probeIe__) \
3238 msg__ = kmalloc(sizeof(CsrWifiSmeScanFullReq), GFP_KERNEL); \
3239 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SCAN_FULL_REQ, dst__, src__); \
3240 msg__->ssidCount = (ssidCount__); \
3241 msg__->ssid = (ssid__); \
3242 msg__->bssid = (bssid__); \
3243 msg__->forceScan = (forceScan__); \
3244 msg__->bssType = (bssType__); \
3245 msg__->scanType = (scanType__); \
3246 msg__->channelListCount = (channelListCount__); \
3247 msg__->channelList = (channelList__); \
3248 msg__->probeIeLength = (probeIeLength__); \
3249 msg__->probeIe = (probeIe__);
3251 #define CsrWifiSmeScanFullReqSendTo(dst__, src__, ssidCount__, ssid__, bssid__, forceScan__, bssType__, scanType__, channelListCount__, channelList__, probeIeLength__, probeIe__) \
3253 CsrWifiSmeScanFullReq *msg__; \
3254 CsrWifiSmeScanFullReqCreate(msg__, dst__, src__, ssidCount__, ssid__, bssid__, forceScan__, bssType__, scanType__, channelListCount__, channelList__, probeIeLength__, probeIe__); \
3255 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
3258 #define CsrWifiSmeScanFullReqSend(src__, ssidCount__, ssid__, bssid__, forceScan__, bssType__, scanType__, channelListCount__, channelList__, probeIeLength__, probeIe__) \
3259 CsrWifiSmeScanFullReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, ssidCount__, ssid__, bssid__, forceScan__, bssType__, scanType__, channelListCount__, channelList__, probeIeLength__, probeIe__)
3261 /*******************************************************************************
3264 CsrWifiSmeScanFullCfmSend
3267 The SME calls this primitive when the results from the scan are
3271 queue - Destination Task Queue
3272 status - Reports the result of the request
3274 *******************************************************************************/
3275 #define CsrWifiSmeScanFullCfmCreate(msg__, dst__, src__, status__) \
3276 msg__ = kmalloc(sizeof(CsrWifiSmeScanFullCfm), GFP_KERNEL); \
3277 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SCAN_FULL_CFM, dst__, src__); \
3278 msg__->status = (status__);
3280 #define CsrWifiSmeScanFullCfmSendTo(dst__, src__, status__) \
3282 CsrWifiSmeScanFullCfm *msg__; \
3283 CsrWifiSmeScanFullCfmCreate(msg__, dst__, src__, status__); \
3284 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3287 #define CsrWifiSmeScanFullCfmSend(dst__, status__) \
3288 CsrWifiSmeScanFullCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
3290 /*******************************************************************************
3293 CsrWifiSmeScanResultIndSend
3296 The SME sends this primitive to all the tasks that have registered to
3297 receive it whenever a scan indication is received from the firmware.
3300 queue - Destination Task Queue
3301 result - Points to a buffer containing a scan result.
3303 *******************************************************************************/
3304 #define CsrWifiSmeScanResultIndCreate(msg__, dst__, src__, result__) \
3305 msg__ = kmalloc(sizeof(CsrWifiSmeScanResultInd), GFP_KERNEL); \
3306 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SCAN_RESULT_IND, dst__, src__); \
3307 msg__->result = (result__);
3309 #define CsrWifiSmeScanResultIndSendTo(dst__, src__, result__) \
3311 CsrWifiSmeScanResultInd *msg__; \
3312 CsrWifiSmeScanResultIndCreate(msg__, dst__, src__, result__); \
3313 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3316 #define CsrWifiSmeScanResultIndSend(dst__, result__) \
3317 CsrWifiSmeScanResultIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, result__)
3319 /*******************************************************************************
3322 CsrWifiSmeScanResultsFlushReqSend
3325 The Wireless Manager calls this primitive to ask the SME to delete all
3326 scan results from its cache, except for the scan result of any currently
3328 As scan results are received by the SME from the firmware, they are
3329 cached in the SME memory.
3330 Any time the Wireless Manager requests scan results, they are returned
3331 from the SME internal cache.
3332 For some applications it may be desirable to clear this cache prior to
3333 requesting that a scan be performed; this will ensure that the cache then
3334 only contains the networks detected in the most recent scan.
3337 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3339 *******************************************************************************/
3340 #define CsrWifiSmeScanResultsFlushReqCreate(msg__, dst__, src__) \
3341 msg__ = kmalloc(sizeof(CsrWifiSmeScanResultsFlushReq), GFP_KERNEL); \
3342 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SCAN_RESULTS_FLUSH_REQ, dst__, src__);
3344 #define CsrWifiSmeScanResultsFlushReqSendTo(dst__, src__) \
3346 CsrWifiSmeScanResultsFlushReq *msg__; \
3347 CsrWifiSmeScanResultsFlushReqCreate(msg__, dst__, src__); \
3348 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
3351 #define CsrWifiSmeScanResultsFlushReqSend(src__) \
3352 CsrWifiSmeScanResultsFlushReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
3354 /*******************************************************************************
3357 CsrWifiSmeScanResultsFlushCfmSend
3360 The SME will call this primitive when the cache has been cleared.
3363 queue - Destination Task Queue
3364 status - Reports the result of the request
3366 *******************************************************************************/
3367 #define CsrWifiSmeScanResultsFlushCfmCreate(msg__, dst__, src__, status__) \
3368 msg__ = kmalloc(sizeof(CsrWifiSmeScanResultsFlushCfm), GFP_KERNEL); \
3369 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SCAN_RESULTS_FLUSH_CFM, dst__, src__); \
3370 msg__->status = (status__);
3372 #define CsrWifiSmeScanResultsFlushCfmSendTo(dst__, src__, status__) \
3374 CsrWifiSmeScanResultsFlushCfm *msg__; \
3375 CsrWifiSmeScanResultsFlushCfmCreate(msg__, dst__, src__, status__); \
3376 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3379 #define CsrWifiSmeScanResultsFlushCfmSend(dst__, status__) \
3380 CsrWifiSmeScanResultsFlushCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
3382 /*******************************************************************************
3385 CsrWifiSmeScanResultsGetReqSend
3388 The wireless manager application calls this primitive to retrieve the
3389 current set of scan results, either after receiving a successful
3390 CSR_WIFI_SME_SCAN_FULL_CFM, or to get autonomous scan results.
3393 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3395 *******************************************************************************/
3396 #define CsrWifiSmeScanResultsGetReqCreate(msg__, dst__, src__) \
3397 msg__ = kmalloc(sizeof(CsrWifiSmeScanResultsGetReq), GFP_KERNEL); \
3398 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SCAN_RESULTS_GET_REQ, dst__, src__);
3400 #define CsrWifiSmeScanResultsGetReqSendTo(dst__, src__) \
3402 CsrWifiSmeScanResultsGetReq *msg__; \
3403 CsrWifiSmeScanResultsGetReqCreate(msg__, dst__, src__); \
3404 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
3407 #define CsrWifiSmeScanResultsGetReqSend(src__) \
3408 CsrWifiSmeScanResultsGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
3410 /*******************************************************************************
3413 CsrWifiSmeScanResultsGetCfmSend
3416 The SME sends this primitive to provide the current set of scan results.
3419 queue - Destination Task Queue
3420 status - Reports the result of the request
3421 scanResultsCount - Number of scan results
3422 scanResults - Points to a buffer containing an array of
3423 CsrWifiSmeScanResult structures.
3425 *******************************************************************************/
3426 #define CsrWifiSmeScanResultsGetCfmCreate(msg__, dst__, src__, status__, scanResultsCount__, scanResults__) \
3427 msg__ = kmalloc(sizeof(CsrWifiSmeScanResultsGetCfm), GFP_KERNEL); \
3428 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SCAN_RESULTS_GET_CFM, dst__, src__); \
3429 msg__->status = (status__); \
3430 msg__->scanResultsCount = (scanResultsCount__); \
3431 msg__->scanResults = (scanResults__);
3433 #define CsrWifiSmeScanResultsGetCfmSendTo(dst__, src__, status__, scanResultsCount__, scanResults__) \
3435 CsrWifiSmeScanResultsGetCfm *msg__; \
3436 CsrWifiSmeScanResultsGetCfmCreate(msg__, dst__, src__, status__, scanResultsCount__, scanResults__); \
3437 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3440 #define CsrWifiSmeScanResultsGetCfmSend(dst__, status__, scanResultsCount__, scanResults__) \
3441 CsrWifiSmeScanResultsGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, scanResultsCount__, scanResults__)
3443 /*******************************************************************************
3446 CsrWifiSmeSetReqSend
3449 Used to pass custom data to the SME. Format is the same as 802.11 Info
3450 Elements => | Id | Length | Data
3451 1) Cmanr Test Mode "Id:0 Length:1 Data:0x00 = OFF 0x01 = ON" "0x00 0x01
3455 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3456 dataLength - Number of bytes in the buffer pointed to by 'data'
3457 data - Pointer to the buffer containing 'dataLength' bytes
3459 *******************************************************************************/
3460 #define CsrWifiSmeSetReqCreate(msg__, dst__, src__, dataLength__, data__) \
3461 msg__ = kmalloc(sizeof(CsrWifiSmeSetReq), GFP_KERNEL); \
3462 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SET_REQ, dst__, src__); \
3463 msg__->dataLength = (dataLength__); \
3464 msg__->data = (data__);
3466 #define CsrWifiSmeSetReqSendTo(dst__, src__, dataLength__, data__) \
3468 CsrWifiSmeSetReq *msg__; \
3469 CsrWifiSmeSetReqCreate(msg__, dst__, src__, dataLength__, data__); \
3470 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
3473 #define CsrWifiSmeSetReqSend(src__, dataLength__, data__) \
3474 CsrWifiSmeSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, dataLength__, data__)
3476 /*******************************************************************************
3479 CsrWifiSmeSmeCommonConfigGetReqSend
3482 This primitive gets the value of the Sme common parameter.
3485 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3487 *******************************************************************************/
3488 #define CsrWifiSmeSmeCommonConfigGetReqCreate(msg__, dst__, src__) \
3489 msg__ = kmalloc(sizeof(CsrWifiSmeSmeCommonConfigGetReq), GFP_KERNEL); \
3490 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SME_COMMON_CONFIG_GET_REQ, dst__, src__);
3492 #define CsrWifiSmeSmeCommonConfigGetReqSendTo(dst__, src__) \
3494 CsrWifiSmeSmeCommonConfigGetReq *msg__; \
3495 CsrWifiSmeSmeCommonConfigGetReqCreate(msg__, dst__, src__); \
3496 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
3499 #define CsrWifiSmeSmeCommonConfigGetReqSend(src__) \
3500 CsrWifiSmeSmeCommonConfigGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
3502 /*******************************************************************************
3505 CsrWifiSmeSmeCommonConfigGetCfmSend
3508 This primitive reports the result of the request.
3511 queue - Destination Task Queue
3512 status - Reports the result of the request
3513 deviceConfig - Configuration options in the SME
3515 *******************************************************************************/
3516 #define CsrWifiSmeSmeCommonConfigGetCfmCreate(msg__, dst__, src__, status__, deviceConfig__) \
3517 msg__ = kmalloc(sizeof(CsrWifiSmeSmeCommonConfigGetCfm), GFP_KERNEL); \
3518 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SME_COMMON_CONFIG_GET_CFM, dst__, src__); \
3519 msg__->status = (status__); \
3520 msg__->deviceConfig = (deviceConfig__);
3522 #define CsrWifiSmeSmeCommonConfigGetCfmSendTo(dst__, src__, status__, deviceConfig__) \
3524 CsrWifiSmeSmeCommonConfigGetCfm *msg__; \
3525 CsrWifiSmeSmeCommonConfigGetCfmCreate(msg__, dst__, src__, status__, deviceConfig__); \
3526 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3529 #define CsrWifiSmeSmeCommonConfigGetCfmSend(dst__, status__, deviceConfig__) \
3530 CsrWifiSmeSmeCommonConfigGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, deviceConfig__)
3532 /*******************************************************************************
3535 CsrWifiSmeSmeCommonConfigSetReqSend
3538 This primitive sets the value of the Sme common.
3541 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3542 deviceConfig - Configuration options in the SME
3544 *******************************************************************************/
3545 #define CsrWifiSmeSmeCommonConfigSetReqCreate(msg__, dst__, src__, deviceConfig__) \
3546 msg__ = kmalloc(sizeof(CsrWifiSmeSmeCommonConfigSetReq), GFP_KERNEL); \
3547 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SME_COMMON_CONFIG_SET_REQ, dst__, src__); \
3548 msg__->deviceConfig = (deviceConfig__);
3550 #define CsrWifiSmeSmeCommonConfigSetReqSendTo(dst__, src__, deviceConfig__) \
3552 CsrWifiSmeSmeCommonConfigSetReq *msg__; \
3553 CsrWifiSmeSmeCommonConfigSetReqCreate(msg__, dst__, src__, deviceConfig__); \
3554 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
3557 #define CsrWifiSmeSmeCommonConfigSetReqSend(src__, deviceConfig__) \
3558 CsrWifiSmeSmeCommonConfigSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, deviceConfig__)
3560 /*******************************************************************************
3563 CsrWifiSmeSmeCommonConfigSetCfmSend
3566 Reports the result of the request
3569 queue - Destination Task Queue
3570 status - Reports the result of the request
3572 *******************************************************************************/
3573 #define CsrWifiSmeSmeCommonConfigSetCfmCreate(msg__, dst__, src__, status__) \
3574 msg__ = kmalloc(sizeof(CsrWifiSmeSmeCommonConfigSetCfm), GFP_KERNEL); \
3575 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SME_COMMON_CONFIG_SET_CFM, dst__, src__); \
3576 msg__->status = (status__);
3578 #define CsrWifiSmeSmeCommonConfigSetCfmSendTo(dst__, src__, status__) \
3580 CsrWifiSmeSmeCommonConfigSetCfm *msg__; \
3581 CsrWifiSmeSmeCommonConfigSetCfmCreate(msg__, dst__, src__, status__); \
3582 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3585 #define CsrWifiSmeSmeCommonConfigSetCfmSend(dst__, status__) \
3586 CsrWifiSmeSmeCommonConfigSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
3588 /*******************************************************************************
3591 CsrWifiSmeSmeStaConfigGetReqSend
3594 This primitive gets the value of the SmeStaConfig parameter.
3597 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3598 interfaceTag - Interface Identifier; unique identifier of an interface
3600 *******************************************************************************/
3601 #define CsrWifiSmeSmeStaConfigGetReqCreate(msg__, dst__, src__, interfaceTag__) \
3602 msg__ = kmalloc(sizeof(CsrWifiSmeSmeStaConfigGetReq), GFP_KERNEL); \
3603 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SME_STA_CONFIG_GET_REQ, dst__, src__); \
3604 msg__->interfaceTag = (interfaceTag__);
3606 #define CsrWifiSmeSmeStaConfigGetReqSendTo(dst__, src__, interfaceTag__) \
3608 CsrWifiSmeSmeStaConfigGetReq *msg__; \
3609 CsrWifiSmeSmeStaConfigGetReqCreate(msg__, dst__, src__, interfaceTag__); \
3610 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
3613 #define CsrWifiSmeSmeStaConfigGetReqSend(src__, interfaceTag__) \
3614 CsrWifiSmeSmeStaConfigGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__)
3616 /*******************************************************************************
3619 CsrWifiSmeSmeStaConfigGetCfmSend
3622 This primitive reports the result of the request.
3625 queue - Destination Task Queue
3626 interfaceTag - Interface Identifier; unique identifier of an interface
3627 status - Reports the result of the request
3628 smeConfig - Current SME Station Parameters
3630 *******************************************************************************/
3631 #define CsrWifiSmeSmeStaConfigGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, smeConfig__) \
3632 msg__ = kmalloc(sizeof(CsrWifiSmeSmeStaConfigGetCfm), GFP_KERNEL); \
3633 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SME_STA_CONFIG_GET_CFM, dst__, src__); \
3634 msg__->interfaceTag = (interfaceTag__); \
3635 msg__->status = (status__); \
3636 msg__->smeConfig = (smeConfig__);
3638 #define CsrWifiSmeSmeStaConfigGetCfmSendTo(dst__, src__, interfaceTag__, status__, smeConfig__) \
3640 CsrWifiSmeSmeStaConfigGetCfm *msg__; \
3641 CsrWifiSmeSmeStaConfigGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, smeConfig__); \
3642 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3645 #define CsrWifiSmeSmeStaConfigGetCfmSend(dst__, interfaceTag__, status__, smeConfig__) \
3646 CsrWifiSmeSmeStaConfigGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, smeConfig__)
3648 /*******************************************************************************
3651 CsrWifiSmeSmeStaConfigSetReqSend
3654 This primitive sets the value of the SmeConfig parameter.
3657 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3658 interfaceTag - Interface Identifier; unique identifier of an interface
3659 smeConfig - SME Station Parameters to be set
3661 *******************************************************************************/
3662 #define CsrWifiSmeSmeStaConfigSetReqCreate(msg__, dst__, src__, interfaceTag__, smeConfig__) \
3663 msg__ = kmalloc(sizeof(CsrWifiSmeSmeStaConfigSetReq), GFP_KERNEL); \
3664 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SME_STA_CONFIG_SET_REQ, dst__, src__); \
3665 msg__->interfaceTag = (interfaceTag__); \
3666 msg__->smeConfig = (smeConfig__);
3668 #define CsrWifiSmeSmeStaConfigSetReqSendTo(dst__, src__, interfaceTag__, smeConfig__) \
3670 CsrWifiSmeSmeStaConfigSetReq *msg__; \
3671 CsrWifiSmeSmeStaConfigSetReqCreate(msg__, dst__, src__, interfaceTag__, smeConfig__); \
3672 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
3675 #define CsrWifiSmeSmeStaConfigSetReqSend(src__, interfaceTag__, smeConfig__) \
3676 CsrWifiSmeSmeStaConfigSetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__, smeConfig__)
3678 /*******************************************************************************
3681 CsrWifiSmeSmeStaConfigSetCfmSend
3684 This primitive reports the result of the request.
3687 queue - Destination Task Queue
3688 interfaceTag - Interface Identifier; unique identifier of an interface
3689 status - Reports the result of the request
3691 *******************************************************************************/
3692 #define CsrWifiSmeSmeStaConfigSetCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
3693 msg__ = kmalloc(sizeof(CsrWifiSmeSmeStaConfigSetCfm), GFP_KERNEL); \
3694 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_SME_STA_CONFIG_SET_CFM, dst__, src__); \
3695 msg__->interfaceTag = (interfaceTag__); \
3696 msg__->status = (status__);
3698 #define CsrWifiSmeSmeStaConfigSetCfmSendTo(dst__, src__, interfaceTag__, status__) \
3700 CsrWifiSmeSmeStaConfigSetCfm *msg__; \
3701 CsrWifiSmeSmeStaConfigSetCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
3702 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3705 #define CsrWifiSmeSmeStaConfigSetCfmSend(dst__, interfaceTag__, status__) \
3706 CsrWifiSmeSmeStaConfigSetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
3708 /*******************************************************************************
3711 CsrWifiSmeStationMacAddressGetReqSend
3714 This primitives is used to retrieve the current MAC address used by the
3718 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3720 *******************************************************************************/
3721 #define CsrWifiSmeStationMacAddressGetReqCreate(msg__, dst__, src__) \
3722 msg__ = kmalloc(sizeof(CsrWifiSmeStationMacAddressGetReq), GFP_KERNEL); \
3723 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_STATION_MAC_ADDRESS_GET_REQ, dst__, src__);
3725 #define CsrWifiSmeStationMacAddressGetReqSendTo(dst__, src__) \
3727 CsrWifiSmeStationMacAddressGetReq *msg__; \
3728 CsrWifiSmeStationMacAddressGetReqCreate(msg__, dst__, src__); \
3729 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
3732 #define CsrWifiSmeStationMacAddressGetReqSend(src__) \
3733 CsrWifiSmeStationMacAddressGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
3735 /*******************************************************************************
3738 CsrWifiSmeStationMacAddressGetCfmSend
3741 This primitive reports the result of the request.
3744 queue - Destination Task Queue
3745 status - Reports the result of the request
3746 stationMacAddress - Current MAC address of the station.
3748 *******************************************************************************/
3749 #define CsrWifiSmeStationMacAddressGetCfmCreate(msg__, dst__, src__, status__, stationMacAddress__) \
3750 msg__ = kmalloc(sizeof(CsrWifiSmeStationMacAddressGetCfm), GFP_KERNEL); \
3751 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_STATION_MAC_ADDRESS_GET_CFM, dst__, src__); \
3752 msg__->status = (status__); \
3753 memcpy(msg__->stationMacAddress, (stationMacAddress__), sizeof(CsrWifiMacAddress) * 2);
3755 #define CsrWifiSmeStationMacAddressGetCfmSendTo(dst__, src__, status__, stationMacAddress__) \
3757 CsrWifiSmeStationMacAddressGetCfm *msg__; \
3758 CsrWifiSmeStationMacAddressGetCfmCreate(msg__, dst__, src__, status__, stationMacAddress__); \
3759 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3762 #define CsrWifiSmeStationMacAddressGetCfmSend(dst__, status__, stationMacAddress__) \
3763 CsrWifiSmeStationMacAddressGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, stationMacAddress__)
3765 /*******************************************************************************
3768 CsrWifiSmeTspecReqSend
3771 The wireless manager application should call this primitive to use the
3773 The chip supports the use of TSPECs and TCLAS for the use of IEEE
3774 802.11/WMM Quality of Service features.
3775 The API allows the wireless manager application to supply a correctly
3776 formatted TSPEC and TCLAS pair to the driver.
3777 After performing basic validation, the driver negotiates the installation
3778 of the TSPEC with the AP as defined by the 802.11 specification.
3779 The driver retains all TSPEC and TCLAS pairs until they are specifically
3781 It is not compulsory for a TSPEC to have a TCLAS (NULL is used to
3782 indicate that no TCLAS is supplied), while a TCLASS always require a
3784 The format of the TSPEC element is specified in 'WMM (including WMM Power
3785 Save) Specification - Version 1.1' and 'ANSI/IEEE Std 802.11-REVmb/D3.0'.
3786 For more information, see 'UniFi Configuring WMM and WMM-PS'.
3789 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3790 interfaceTag - Interface Identifier; unique identifier of an interface
3791 action - Specifies the action to be carried out on the list of TSPECs.
3792 CSR_WIFI_SME_LIST_ACTION_FLUSH is not applicable here.
3793 transactionId - Unique Transaction ID for the TSPEC, as assigned by the
3795 strict - If it set to false, allows the SME to perform automatic
3797 ctrlMask - Additional TSPEC configuration for CCX.
3798 Set mask with values from CsrWifiSmeTspecCtrl.
3799 CURRENTLY NOT SUPPORTED
3800 tspecLength - Length of the TSPEC.
3801 tspec - Points to the first byte of the TSPEC
3802 tclasLength - Length of the TCLAS.
3803 If it is equal to 0, no TCLASS is provided for the TSPEC
3804 tclas - Points to the first byte of the TCLAS, if any.
3806 *******************************************************************************/
3807 #define CsrWifiSmeTspecReqCreate(msg__, dst__, src__, interfaceTag__, action__, transactionId__, strict__, ctrlMask__, tspecLength__, tspec__, tclasLength__, tclas__) \
3808 msg__ = kmalloc(sizeof(CsrWifiSmeTspecReq), GFP_KERNEL); \
3809 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_TSPEC_REQ, dst__, src__); \
3810 msg__->interfaceTag = (interfaceTag__); \
3811 msg__->action = (action__); \
3812 msg__->transactionId = (transactionId__); \
3813 msg__->strict = (strict__); \
3814 msg__->ctrlMask = (ctrlMask__); \
3815 msg__->tspecLength = (tspecLength__); \
3816 msg__->tspec = (tspec__); \
3817 msg__->tclasLength = (tclasLength__); \
3818 msg__->tclas = (tclas__);
3820 #define CsrWifiSmeTspecReqSendTo(dst__, src__, interfaceTag__, action__, transactionId__, strict__, ctrlMask__, tspecLength__, tspec__, tclasLength__, tclas__) \
3822 CsrWifiSmeTspecReq *msg__; \
3823 CsrWifiSmeTspecReqCreate(msg__, dst__, src__, interfaceTag__, action__, transactionId__, strict__, ctrlMask__, tspecLength__, tspec__, tclasLength__, tclas__); \
3824 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
3827 #define CsrWifiSmeTspecReqSend(src__, interfaceTag__, action__, transactionId__, strict__, ctrlMask__, tspecLength__, tspec__, tclasLength__, tclas__) \
3828 CsrWifiSmeTspecReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, interfaceTag__, action__, transactionId__, strict__, ctrlMask__, tspecLength__, tspec__, tclasLength__, tclas__)
3830 /*******************************************************************************
3833 CsrWifiSmeTspecIndSend
3836 The SME will send this primitive to all the task that have registered to
3837 receive it when a status change in the TSPEC occurs.
3840 queue - Destination Task Queue
3841 interfaceTag - Interface Identifier; unique identifier of an interface
3842 transactionId - Unique Transaction ID for the TSPEC, as assigned by the
3844 tspecResultCode - Specifies the TSPEC operation requested by the peer
3846 tspecLength - Length of the TSPEC.
3847 tspec - Points to the first byte of the TSPEC
3849 *******************************************************************************/
3850 #define CsrWifiSmeTspecIndCreate(msg__, dst__, src__, interfaceTag__, transactionId__, tspecResultCode__, tspecLength__, tspec__) \
3851 msg__ = kmalloc(sizeof(CsrWifiSmeTspecInd), GFP_KERNEL); \
3852 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_TSPEC_IND, dst__, src__); \
3853 msg__->interfaceTag = (interfaceTag__); \
3854 msg__->transactionId = (transactionId__); \
3855 msg__->tspecResultCode = (tspecResultCode__); \
3856 msg__->tspecLength = (tspecLength__); \
3857 msg__->tspec = (tspec__);
3859 #define CsrWifiSmeTspecIndSendTo(dst__, src__, interfaceTag__, transactionId__, tspecResultCode__, tspecLength__, tspec__) \
3861 CsrWifiSmeTspecInd *msg__; \
3862 CsrWifiSmeTspecIndCreate(msg__, dst__, src__, interfaceTag__, transactionId__, tspecResultCode__, tspecLength__, tspec__); \
3863 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3866 #define CsrWifiSmeTspecIndSend(dst__, interfaceTag__, transactionId__, tspecResultCode__, tspecLength__, tspec__) \
3867 CsrWifiSmeTspecIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, transactionId__, tspecResultCode__, tspecLength__, tspec__)
3869 /*******************************************************************************
3872 CsrWifiSmeTspecCfmSend
3875 The SME calls the primitive to report the result of the TSpec primitive
3879 queue - Destination Task Queue
3880 interfaceTag - Interface Identifier; unique identifier of an interface
3881 status - Reports the result of the request
3882 transactionId - Unique Transaction ID for the TSPEC, as assigned by the
3884 tspecResultCode - Specifies the result of the negotiated TSPEC operation
3885 tspecLength - Length of the TSPEC.
3886 tspec - Points to the first byte of the TSPEC
3888 *******************************************************************************/
3889 #define CsrWifiSmeTspecCfmCreate(msg__, dst__, src__, interfaceTag__, status__, transactionId__, tspecResultCode__, tspecLength__, tspec__) \
3890 msg__ = kmalloc(sizeof(CsrWifiSmeTspecCfm), GFP_KERNEL); \
3891 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_TSPEC_CFM, dst__, src__); \
3892 msg__->interfaceTag = (interfaceTag__); \
3893 msg__->status = (status__); \
3894 msg__->transactionId = (transactionId__); \
3895 msg__->tspecResultCode = (tspecResultCode__); \
3896 msg__->tspecLength = (tspecLength__); \
3897 msg__->tspec = (tspec__);
3899 #define CsrWifiSmeTspecCfmSendTo(dst__, src__, interfaceTag__, status__, transactionId__, tspecResultCode__, tspecLength__, tspec__) \
3901 CsrWifiSmeTspecCfm *msg__; \
3902 CsrWifiSmeTspecCfmCreate(msg__, dst__, src__, interfaceTag__, status__, transactionId__, tspecResultCode__, tspecLength__, tspec__); \
3903 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3906 #define CsrWifiSmeTspecCfmSend(dst__, interfaceTag__, status__, transactionId__, tspecResultCode__, tspecLength__, tspec__) \
3907 CsrWifiSmeTspecCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, transactionId__, tspecResultCode__, tspecLength__, tspec__)
3909 /*******************************************************************************
3912 CsrWifiSmeVersionsGetReqSend
3915 This primitive gets the value of the Versions parameter.
3918 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3920 *******************************************************************************/
3921 #define CsrWifiSmeVersionsGetReqCreate(msg__, dst__, src__) \
3922 msg__ = kmalloc(sizeof(CsrWifiSmeVersionsGetReq), GFP_KERNEL); \
3923 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_VERSIONS_GET_REQ, dst__, src__);
3925 #define CsrWifiSmeVersionsGetReqSendTo(dst__, src__) \
3927 CsrWifiSmeVersionsGetReq *msg__; \
3928 CsrWifiSmeVersionsGetReqCreate(msg__, dst__, src__); \
3929 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
3932 #define CsrWifiSmeVersionsGetReqSend(src__) \
3933 CsrWifiSmeVersionsGetReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
3935 /*******************************************************************************
3938 CsrWifiSmeVersionsGetCfmSend
3941 This primitive reports the result of the request.
3944 queue - Destination Task Queue
3945 status - Reports the result of the request
3946 versions - Version IDs of the product
3948 *******************************************************************************/
3949 #define CsrWifiSmeVersionsGetCfmCreate(msg__, dst__, src__, status__, versions__) \
3950 msg__ = kmalloc(sizeof(CsrWifiSmeVersionsGetCfm), GFP_KERNEL); \
3951 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_VERSIONS_GET_CFM, dst__, src__); \
3952 msg__->status = (status__); \
3953 msg__->versions = (versions__);
3955 #define CsrWifiSmeVersionsGetCfmSendTo(dst__, src__, status__, versions__) \
3957 CsrWifiSmeVersionsGetCfm *msg__; \
3958 CsrWifiSmeVersionsGetCfmCreate(msg__, dst__, src__, status__, versions__); \
3959 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
3962 #define CsrWifiSmeVersionsGetCfmSend(dst__, status__, versions__) \
3963 CsrWifiSmeVersionsGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__, versions__)
3965 /*******************************************************************************
3968 CsrWifiSmeWifiFlightmodeReqSend
3971 The wireless manager application may call this primitive on boot-up of
3972 the platform to ensure that the chip is placed in a mode that prevents
3973 any emission of RF energy.
3974 This primitive is an alternative to CSR_WIFI_SME_WIFI_ON_REQ.
3975 As in CSR_WIFI_SME_WIFI_ON_REQ, it causes the download of the patch file
3976 (if any) and the programming of the initial MIB settings (if supplied by
3977 the WMA), but it also ensures that the chip is left in its lowest
3978 possible power-mode with the radio subsystems disabled.
3979 This feature is useful on platforms where power cannot be removed from
3980 the chip (leaving the chip not initialised will cause it to consume more
3981 power so calling this function ensures that the chip is initialised into
3982 a low power mode but without entering a state where it could emit any RF
3984 NOTE: this primitive does not cause the Wi-Fi to change state: Wi-Fi
3985 stays conceptually off. Configuration primitives can be sent after
3986 CSR_WIFI_SME_WIFI_FLIGHTMODE_REQ and the configuration will be maintained.
3987 Requests that require the state of the Wi-Fi to be ON will return
3988 CSR_WIFI_SME_STATUS_WIFI_OFF in their confirms.
3991 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
3992 address - Optionally specifies a station MAC address.
3993 In normal use, the manager should set the address to 0xFF
3994 0xFF 0xFF 0xFF 0xFF 0xFF, which will cause the chip to use
3995 the MAC address in the MIB.
3996 mibFilesCount - Number of provided data blocks with initial MIB values
3997 mibFiles - Points to the first data block with initial MIB values.
3998 These data blocks are typically the contents of the provided
3999 files ufmib.dat and localmib.dat, available from the host
4000 file system, if they exist.
4001 These files typically contain radio tuning and calibration
4003 More values can be created using the Host Tools.
4005 *******************************************************************************/
4006 #define CsrWifiSmeWifiFlightmodeReqCreate(msg__, dst__, src__, address__, mibFilesCount__, mibFiles__) \
4007 msg__ = kmalloc(sizeof(CsrWifiSmeWifiFlightmodeReq), GFP_KERNEL); \
4008 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_WIFI_FLIGHTMODE_REQ, dst__, src__); \
4009 msg__->address = (address__); \
4010 msg__->mibFilesCount = (mibFilesCount__); \
4011 msg__->mibFiles = (mibFiles__);
4013 #define CsrWifiSmeWifiFlightmodeReqSendTo(dst__, src__, address__, mibFilesCount__, mibFiles__) \
4015 CsrWifiSmeWifiFlightmodeReq *msg__; \
4016 CsrWifiSmeWifiFlightmodeReqCreate(msg__, dst__, src__, address__, mibFilesCount__, mibFiles__); \
4017 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
4020 #define CsrWifiSmeWifiFlightmodeReqSend(src__, address__, mibFilesCount__, mibFiles__) \
4021 CsrWifiSmeWifiFlightmodeReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, address__, mibFilesCount__, mibFiles__)
4023 /*******************************************************************************
4026 CsrWifiSmeWifiFlightmodeCfmSend
4029 The SME calls this primitive when the chip is initialised for low power
4030 mode and with the radio subsystem disabled. To leave flight mode, and
4031 enable Wi-Fi, the wireless manager application should call
4032 CSR_WIFI_SME_WIFI_ON_REQ.
4035 queue - Destination Task Queue
4036 status - Reports the result of the request
4038 *******************************************************************************/
4039 #define CsrWifiSmeWifiFlightmodeCfmCreate(msg__, dst__, src__, status__) \
4040 msg__ = kmalloc(sizeof(CsrWifiSmeWifiFlightmodeCfm), GFP_KERNEL); \
4041 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_WIFI_FLIGHTMODE_CFM, dst__, src__); \
4042 msg__->status = (status__);
4044 #define CsrWifiSmeWifiFlightmodeCfmSendTo(dst__, src__, status__) \
4046 CsrWifiSmeWifiFlightmodeCfm *msg__; \
4047 CsrWifiSmeWifiFlightmodeCfmCreate(msg__, dst__, src__, status__); \
4048 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
4051 #define CsrWifiSmeWifiFlightmodeCfmSend(dst__, status__) \
4052 CsrWifiSmeWifiFlightmodeCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
4054 /*******************************************************************************
4057 CsrWifiSmeWifiOffReqSend
4060 The wireless manager application calls this primitive to turn off the
4061 chip, thus saving power when Wi-Fi is not in use.
4064 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
4066 *******************************************************************************/
4067 #define CsrWifiSmeWifiOffReqCreate(msg__, dst__, src__) \
4068 msg__ = kmalloc(sizeof(CsrWifiSmeWifiOffReq), GFP_KERNEL); \
4069 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_WIFI_OFF_REQ, dst__, src__);
4071 #define CsrWifiSmeWifiOffReqSendTo(dst__, src__) \
4073 CsrWifiSmeWifiOffReq *msg__; \
4074 CsrWifiSmeWifiOffReqCreate(msg__, dst__, src__); \
4075 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
4078 #define CsrWifiSmeWifiOffReqSend(src__) \
4079 CsrWifiSmeWifiOffReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__)
4081 /*******************************************************************************
4084 CsrWifiSmeWifiOffIndSend
4087 The SME sends this primitive to all the tasks that have registered to
4088 receive it to report that the chip has been turned off.
4091 queue - Destination Task Queue
4092 reason - Indicates the reason why the Wi-Fi has been switched off.
4094 *******************************************************************************/
4095 #define CsrWifiSmeWifiOffIndCreate(msg__, dst__, src__, reason__) \
4096 msg__ = kmalloc(sizeof(CsrWifiSmeWifiOffInd), GFP_KERNEL); \
4097 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_WIFI_OFF_IND, dst__, src__); \
4098 msg__->reason = (reason__);
4100 #define CsrWifiSmeWifiOffIndSendTo(dst__, src__, reason__) \
4102 CsrWifiSmeWifiOffInd *msg__; \
4103 CsrWifiSmeWifiOffIndCreate(msg__, dst__, src__, reason__); \
4104 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
4107 #define CsrWifiSmeWifiOffIndSend(dst__, reason__) \
4108 CsrWifiSmeWifiOffIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, reason__)
4110 /*******************************************************************************
4113 CsrWifiSmeWifiOffCfmSend
4116 After receiving CSR_WIFI_SME_WIFI_OFF_REQ, if the chip is connected to a
4117 network, the SME will perform a disconnect operation, will send a
4118 CSR_WIFI_SME_MEDIA_STATUS_IND with
4119 CSR_WIFI_SME_MEDIA_STATUS_DISCONNECTED, and then will call
4120 CSR_WIFI_SME_WIFI_OFF_CFM when the chip is off.
4123 queue - Destination Task Queue
4124 status - Reports the result of the request
4126 *******************************************************************************/
4127 #define CsrWifiSmeWifiOffCfmCreate(msg__, dst__, src__, status__) \
4128 msg__ = kmalloc(sizeof(CsrWifiSmeWifiOffCfm), GFP_KERNEL); \
4129 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_WIFI_OFF_CFM, dst__, src__); \
4130 msg__->status = (status__);
4132 #define CsrWifiSmeWifiOffCfmSendTo(dst__, src__, status__) \
4134 CsrWifiSmeWifiOffCfm *msg__; \
4135 CsrWifiSmeWifiOffCfmCreate(msg__, dst__, src__, status__); \
4136 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
4139 #define CsrWifiSmeWifiOffCfmSend(dst__, status__) \
4140 CsrWifiSmeWifiOffCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
4142 /*******************************************************************************
4145 CsrWifiSmeWifiOnReqSend
4148 The wireless manager application calls this primitive to turn on the
4150 If the Wi-Fi chip is currently off, the SME turns the Wi-Fi chip on,
4151 downloads the patch file (if any), and programs the initial MIB settings
4152 (if supplied by the WMA).
4153 The patch file is not provided with the SME API; its downloading is
4154 automatic and handled internally by the system.
4155 The MIB settings, when provided, override the default values that the
4156 firmware loads from EEPROM.
4157 If the Wi-Fi chip is already on, the SME takes no action and returns a
4158 successful status in the confirm.
4161 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
4162 address - Optionally specifies a station MAC address.
4163 In normal use, the manager should set the address to 0xFF
4164 0xFF 0xFF 0xFF 0xFF 0xFF, which will cause the chip to use
4165 the MAC address in the MIB
4166 mibFilesCount - Number of provided data blocks with initial MIB values
4167 mibFiles - Points to the first data block with initial MIB values.
4168 These data blocks are typically the contents of the provided
4169 files ufmib.dat and localmib.dat, available from the host
4170 file system, if they exist.
4171 These files typically contain radio tuning and calibration
4173 More values can be created using the Host Tools.
4175 *******************************************************************************/
4176 #define CsrWifiSmeWifiOnReqCreate(msg__, dst__, src__, address__, mibFilesCount__, mibFiles__) \
4177 msg__ = kmalloc(sizeof(CsrWifiSmeWifiOnReq), GFP_KERNEL); \
4178 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_WIFI_ON_REQ, dst__, src__); \
4179 msg__->address = (address__); \
4180 msg__->mibFilesCount = (mibFilesCount__); \
4181 msg__->mibFiles = (mibFiles__);
4183 #define CsrWifiSmeWifiOnReqSendTo(dst__, src__, address__, mibFilesCount__, mibFiles__) \
4185 CsrWifiSmeWifiOnReq *msg__; \
4186 CsrWifiSmeWifiOnReqCreate(msg__, dst__, src__, address__, mibFilesCount__, mibFiles__); \
4187 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
4190 #define CsrWifiSmeWifiOnReqSend(src__, address__, mibFilesCount__, mibFiles__) \
4191 CsrWifiSmeWifiOnReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, address__, mibFilesCount__, mibFiles__)
4193 /*******************************************************************************
4196 CsrWifiSmeWifiOnIndSend
4199 The SME sends this primitive to all tasks that have registered to receive
4200 it once the chip becomes available and ready to use.
4203 queue - Destination Task Queue
4204 address - Current MAC address
4206 *******************************************************************************/
4207 #define CsrWifiSmeWifiOnIndCreate(msg__, dst__, src__, address__) \
4208 msg__ = kmalloc(sizeof(CsrWifiSmeWifiOnInd), GFP_KERNEL); \
4209 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_WIFI_ON_IND, dst__, src__); \
4210 msg__->address = (address__);
4212 #define CsrWifiSmeWifiOnIndSendTo(dst__, src__, address__) \
4214 CsrWifiSmeWifiOnInd *msg__; \
4215 CsrWifiSmeWifiOnIndCreate(msg__, dst__, src__, address__); \
4216 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
4219 #define CsrWifiSmeWifiOnIndSend(dst__, address__) \
4220 CsrWifiSmeWifiOnIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, address__)
4222 /*******************************************************************************
4225 CsrWifiSmeWifiOnCfmSend
4228 The SME sends this primitive to the task that has sent the request once
4229 the chip has been initialised and is available for use.
4232 queue - Destination Task Queue
4233 status - Reports the result of the request
4235 *******************************************************************************/
4236 #define CsrWifiSmeWifiOnCfmCreate(msg__, dst__, src__, status__) \
4237 msg__ = kmalloc(sizeof(CsrWifiSmeWifiOnCfm), GFP_KERNEL); \
4238 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_WIFI_ON_CFM, dst__, src__); \
4239 msg__->status = (status__);
4241 #define CsrWifiSmeWifiOnCfmSendTo(dst__, src__, status__) \
4243 CsrWifiSmeWifiOnCfm *msg__; \
4244 CsrWifiSmeWifiOnCfmCreate(msg__, dst__, src__, status__); \
4245 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
4248 #define CsrWifiSmeWifiOnCfmSend(dst__, status__) \
4249 CsrWifiSmeWifiOnCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
4251 /*******************************************************************************
4254 CsrWifiSmeWpsConfigurationReqSend
4257 This primitive passes the WPS information for the device to SME. This may
4258 be accepted only if no interface is active.
4261 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
4262 wpsConfig - WPS config.
4264 *******************************************************************************/
4265 #define CsrWifiSmeWpsConfigurationReqCreate(msg__, dst__, src__, wpsConfig__) \
4266 msg__ = kmalloc(sizeof(CsrWifiSmeWpsConfigurationReq), GFP_KERNEL); \
4267 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_WPS_CONFIGURATION_REQ, dst__, src__); \
4268 msg__->wpsConfig = (wpsConfig__);
4270 #define CsrWifiSmeWpsConfigurationReqSendTo(dst__, src__, wpsConfig__) \
4272 CsrWifiSmeWpsConfigurationReq *msg__; \
4273 CsrWifiSmeWpsConfigurationReqCreate(msg__, dst__, src__, wpsConfig__); \
4274 CsrMsgTransport(dst__, CSR_WIFI_SME_PRIM, msg__); \
4277 #define CsrWifiSmeWpsConfigurationReqSend(src__, wpsConfig__) \
4278 CsrWifiSmeWpsConfigurationReqSendTo(CSR_WIFI_SME_LIB_DESTINATION_QUEUE, src__, wpsConfig__)
4280 /*******************************************************************************
4283 CsrWifiSmeWpsConfigurationCfmSend
4289 queue - Destination Task Queue
4290 status - Status of the request.
4292 *******************************************************************************/
4293 #define CsrWifiSmeWpsConfigurationCfmCreate(msg__, dst__, src__, status__) \
4294 msg__ = kmalloc(sizeof(CsrWifiSmeWpsConfigurationCfm), GFP_KERNEL); \
4295 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_PRIM, CSR_WIFI_SME_WPS_CONFIGURATION_CFM, dst__, src__); \
4296 msg__->status = (status__);
4298 #define CsrWifiSmeWpsConfigurationCfmSendTo(dst__, src__, status__) \
4300 CsrWifiSmeWpsConfigurationCfm *msg__; \
4301 CsrWifiSmeWpsConfigurationCfmCreate(msg__, dst__, src__, status__); \
4302 CsrSchedMessagePut(dst__, CSR_WIFI_SME_PRIM, msg__); \
4305 #define CsrWifiSmeWpsConfigurationCfmSend(dst__, status__) \
4306 CsrWifiSmeWpsConfigurationCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
4313 #endif /* CSR_WIFI_SME_LIB_H__ */