• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*****************************************************************************
2 
3             (c) Cambridge Silicon Radio Limited 2012
4             All rights reserved and confidential information of CSR
5 
6             Refer to LICENSE.txt included with this source for details
7             on the license terms.
8 
9 *****************************************************************************/
10 
11 /* Note: this is an auto-generated file. */
12 
13 #ifndef CSR_WIFI_NME_AP_LIB_H__
14 #define CSR_WIFI_NME_AP_LIB_H__
15 
16 #include "csr_sched.h"
17 #include "csr_macro.h"
18 #include "csr_msg_transport.h"
19 
20 #include "csr_wifi_lib.h"
21 
22 #include "csr_wifi_nme_ap_prim.h"
23 #include "csr_wifi_nme_task.h"
24 
25 #ifndef CSR_WIFI_NME_ENABLE
26 #error CSR_WIFI_NME_ENABLE MUST be defined inorder to use csr_wifi_nme_ap_lib.h
27 #endif
28 #ifndef CSR_WIFI_AP_ENABLE
29 #error CSR_WIFI_AP_ENABLE MUST be defined inorder to use csr_wifi_nme_ap_lib.h
30 #endif
31 
32 /*----------------------------------------------------------------------------*
33  *  CsrWifiNmeApFreeUpstreamMessageContents
34  *
35  *  DESCRIPTION
36  *      Free the allocated memory in a CSR_WIFI_NME_AP upstream message. Does not
37  *      free the message itself, and can only be used for upstream messages.
38  *
39  *  PARAMETERS
40  *      Deallocates the resources in a CSR_WIFI_NME_AP upstream message
41  *----------------------------------------------------------------------------*/
42 void CsrWifiNmeApFreeUpstreamMessageContents(u16 eventClass, void *message);
43 
44 /*----------------------------------------------------------------------------*
45  *  CsrWifiNmeApFreeDownstreamMessageContents
46  *
47  *  DESCRIPTION
48  *      Free the allocated memory in a CSR_WIFI_NME_AP downstream message. Does not
49  *      free the message itself, and can only be used for downstream messages.
50  *
51  *  PARAMETERS
52  *      Deallocates the resources in a CSR_WIFI_NME_AP downstream message
53  *----------------------------------------------------------------------------*/
54 void CsrWifiNmeApFreeDownstreamMessageContents(u16 eventClass, void *message);
55 
56 /*******************************************************************************
57 
58   NAME
59     CsrWifiNmeApConfigSetReqSend
60 
61   DESCRIPTION
62     This primitive passes AP configuration info for NME. This can be sent at
63     any time but will be acted upon when the AP is started again. This
64     information is common to both P2P GO and AP
65 
66   PARAMETERS
67     queue       - Message Source Task Queue (Cfm's will be sent to this Queue)
68     apConfig    - AP configuration for the NME.
69     apMacConfig - MAC configuration to be acted on when
70                   CSR_WIFI_NME_AP_START.request is sent.
71 
72 *******************************************************************************/
73 #define CsrWifiNmeApConfigSetReqCreate(msg__, dst__, src__, apConfig__, apMacConfig__) \
74     msg__ = kmalloc(sizeof(CsrWifiNmeApConfigSetReq), GFP_KERNEL); \
75     CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_NME_AP_PRIM, CSR_WIFI_NME_AP_CONFIG_SET_REQ, dst__, src__); \
76     msg__->apConfig = (apConfig__); \
77     msg__->apMacConfig = (apMacConfig__);
78 
79 #define CsrWifiNmeApConfigSetReqSendTo(dst__, src__, apConfig__, apMacConfig__) \
80     { \
81         CsrWifiNmeApConfigSetReq *msg__; \
82         CsrWifiNmeApConfigSetReqCreate(msg__, dst__, src__, apConfig__, apMacConfig__); \
83         CsrMsgTransport(dst__, CSR_WIFI_NME_AP_PRIM, msg__); \
84     }
85 
86 #define CsrWifiNmeApConfigSetReqSend(src__, apConfig__, apMacConfig__) \
87     CsrWifiNmeApConfigSetReqSendTo(CSR_WIFI_NME_IFACEQUEUE, src__, apConfig__, apMacConfig__)
88 
89 /*******************************************************************************
90 
91   NAME
92     CsrWifiNmeApConfigSetCfmSend
93 
94   DESCRIPTION
95     This primitive reports the result of the request.
96 
97   PARAMETERS
98     queue  - Destination Task Queue
99     status - Status of the request.
100 
101 *******************************************************************************/
102 #define CsrWifiNmeApConfigSetCfmCreate(msg__, dst__, src__, status__) \
103     msg__ = kmalloc(sizeof(CsrWifiNmeApConfigSetCfm), GFP_KERNEL); \
104     CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_NME_AP_PRIM, CSR_WIFI_NME_AP_CONFIG_SET_CFM, dst__, src__); \
105     msg__->status = (status__);
106 
107 #define CsrWifiNmeApConfigSetCfmSendTo(dst__, src__, status__) \
108     { \
109         CsrWifiNmeApConfigSetCfm *msg__; \
110         CsrWifiNmeApConfigSetCfmCreate(msg__, dst__, src__, status__); \
111         CsrSchedMessagePut(dst__, CSR_WIFI_NME_AP_PRIM, msg__); \
112     }
113 
114 #define CsrWifiNmeApConfigSetCfmSend(dst__, status__) \
115     CsrWifiNmeApConfigSetCfmSendTo(dst__, CSR_WIFI_NME_IFACEQUEUE, status__)
116 
117 /*******************************************************************************
118 
119   NAME
120     CsrWifiNmeApStaRemoveReqSend
121 
122   DESCRIPTION
123     This primitive disconnects a connected station. If keepBlocking is set to
124     TRUE, the station with the specified MAC address is not allowed to
125     connect. If the requested station is not already connected,it may be
126     blocked based on keepBlocking parameter.
127 
128   PARAMETERS
129     queue         - Message Source Task Queue (Cfm's will be sent to this Queue)
130     interfaceTag  - Interface Identifier; unique identifier of an interface
131     staMacAddress - Mac Address of the station to be disconnected or blocked
132     keepBlocking  - If TRUE, the station is blocked. If FALSE and the station is
133                     connected, disconnect the station. If FALSE and the station
134                     is not connected, no action is taken.
135 
136 *******************************************************************************/
137 #define CsrWifiNmeApStaRemoveReqCreate(msg__, dst__, src__, interfaceTag__, staMacAddress__, keepBlocking__) \
138     msg__ = kmalloc(sizeof(CsrWifiNmeApStaRemoveReq), GFP_KERNEL); \
139     CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_NME_AP_PRIM, CSR_WIFI_NME_AP_STA_REMOVE_REQ, dst__, src__); \
140     msg__->interfaceTag = (interfaceTag__); \
141     msg__->staMacAddress = (staMacAddress__); \
142     msg__->keepBlocking = (keepBlocking__);
143 
144 #define CsrWifiNmeApStaRemoveReqSendTo(dst__, src__, interfaceTag__, staMacAddress__, keepBlocking__) \
145     { \
146         CsrWifiNmeApStaRemoveReq *msg__; \
147         CsrWifiNmeApStaRemoveReqCreate(msg__, dst__, src__, interfaceTag__, staMacAddress__, keepBlocking__); \
148         CsrMsgTransport(dst__, CSR_WIFI_NME_AP_PRIM, msg__); \
149     }
150 
151 #define CsrWifiNmeApStaRemoveReqSend(src__, interfaceTag__, staMacAddress__, keepBlocking__) \
152     CsrWifiNmeApStaRemoveReqSendTo(CSR_WIFI_NME_IFACEQUEUE, src__, interfaceTag__, staMacAddress__, keepBlocking__)
153 
154 /*******************************************************************************
155 
156   NAME
157     CsrWifiNmeApStartReqSend
158 
159   DESCRIPTION
160     This primitive requests NME to started the AP operation.
161 
162   PARAMETERS
163     queue          - Message Source Task Queue (Cfm's will be sent to this Queue)
164     interfaceTag   - Interface identifier; unique identifier of an interface
165     apType         - AP Type specifies the Legacy AP or P2P GO operation
166     cloakSsid      - Indicates whether the SSID should be cloaked (hidden and
167                      not broadcast in beacon) or not
168     ssid           - Service Set Identifier
169     ifIndex        - Radio interface
170     channel        - Channel number of the channel to use
171     apCredentials  - Security credential configuration.
172     maxConnections - Maximum number of stations/P2P clients allowed
173     p2pGoParam     - P2P specific GO parameters.
174     wpsEnabled     - Indicates whether WPS should be enabled or not
175 
176 *******************************************************************************/
177 #define CsrWifiNmeApStartReqCreate(msg__, dst__, src__, interfaceTag__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, apCredentials__, maxConnections__, p2pGoParam__, wpsEnabled__) \
178     msg__ = kmalloc(sizeof(CsrWifiNmeApStartReq), GFP_KERNEL); \
179     CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_NME_AP_PRIM, CSR_WIFI_NME_AP_START_REQ, dst__, src__); \
180     msg__->interfaceTag = (interfaceTag__); \
181     msg__->apType = (apType__); \
182     msg__->cloakSsid = (cloakSsid__); \
183     msg__->ssid = (ssid__); \
184     msg__->ifIndex = (ifIndex__); \
185     msg__->channel = (channel__); \
186     msg__->apCredentials = (apCredentials__); \
187     msg__->maxConnections = (maxConnections__); \
188     msg__->p2pGoParam = (p2pGoParam__); \
189     msg__->wpsEnabled = (wpsEnabled__);
190 
191 #define CsrWifiNmeApStartReqSendTo(dst__, src__, interfaceTag__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, apCredentials__, maxConnections__, p2pGoParam__, wpsEnabled__) \
192     { \
193         CsrWifiNmeApStartReq *msg__; \
194         CsrWifiNmeApStartReqCreate(msg__, dst__, src__, interfaceTag__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, apCredentials__, maxConnections__, p2pGoParam__, wpsEnabled__); \
195         CsrMsgTransport(dst__, CSR_WIFI_NME_AP_PRIM, msg__); \
196     }
197 
198 #define CsrWifiNmeApStartReqSend(src__, interfaceTag__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, apCredentials__, maxConnections__, p2pGoParam__, wpsEnabled__) \
199     CsrWifiNmeApStartReqSendTo(CSR_WIFI_NME_IFACEQUEUE, src__, interfaceTag__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, apCredentials__, maxConnections__, p2pGoParam__, wpsEnabled__)
200 
201 /*******************************************************************************
202 
203   NAME
204     CsrWifiNmeApStartCfmSend
205 
206   DESCRIPTION
207     This primitive reports the result of CSR_WIFI_NME_AP_START.request.
208 
209   PARAMETERS
210     queue        - Destination Task Queue
211     interfaceTag - Interface identifier; unique identifier of an interface
212     status       - Status of the request.
213     ssid         - Service Set Identifier
214 
215 *******************************************************************************/
216 #define CsrWifiNmeApStartCfmCreate(msg__, dst__, src__, interfaceTag__, status__, ssid__) \
217     msg__ = kmalloc(sizeof(CsrWifiNmeApStartCfm), GFP_KERNEL); \
218     CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_NME_AP_PRIM, CSR_WIFI_NME_AP_START_CFM, dst__, src__); \
219     msg__->interfaceTag = (interfaceTag__); \
220     msg__->status = (status__); \
221     msg__->ssid = (ssid__);
222 
223 #define CsrWifiNmeApStartCfmSendTo(dst__, src__, interfaceTag__, status__, ssid__) \
224     { \
225         CsrWifiNmeApStartCfm *msg__; \
226         CsrWifiNmeApStartCfmCreate(msg__, dst__, src__, interfaceTag__, status__, ssid__); \
227         CsrSchedMessagePut(dst__, CSR_WIFI_NME_AP_PRIM, msg__); \
228     }
229 
230 #define CsrWifiNmeApStartCfmSend(dst__, interfaceTag__, status__, ssid__) \
231     CsrWifiNmeApStartCfmSendTo(dst__, CSR_WIFI_NME_IFACEQUEUE, interfaceTag__, status__, ssid__)
232 
233 /*******************************************************************************
234 
235   NAME
236     CsrWifiNmeApStationIndSend
237 
238   DESCRIPTION
239     This primitive indicates that a station has joined or a previously joined
240     station has left the BSS/group
241 
242   PARAMETERS
243     queue             - Destination Task Queue
244     interfaceTag      - Interface Identifier; unique identifier of an interface
245     mediaStatus       - Indicates whether the station is connected or
246                         disconnected
247     peerMacAddress    - MAC address of the station
248     peerDeviceAddress - P2P Device Address
249 
250 *******************************************************************************/
251 #define CsrWifiNmeApStationIndCreate(msg__, dst__, src__, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__) \
252     msg__ = kmalloc(sizeof(CsrWifiNmeApStationInd), GFP_KERNEL); \
253     CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_NME_AP_PRIM, CSR_WIFI_NME_AP_STATION_IND, dst__, src__); \
254     msg__->interfaceTag = (interfaceTag__); \
255     msg__->mediaStatus = (mediaStatus__); \
256     msg__->peerMacAddress = (peerMacAddress__); \
257     msg__->peerDeviceAddress = (peerDeviceAddress__);
258 
259 #define CsrWifiNmeApStationIndSendTo(dst__, src__, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__) \
260     { \
261         CsrWifiNmeApStationInd *msg__; \
262         CsrWifiNmeApStationIndCreate(msg__, dst__, src__, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__); \
263         CsrSchedMessagePut(dst__, CSR_WIFI_NME_AP_PRIM, msg__); \
264     }
265 
266 #define CsrWifiNmeApStationIndSend(dst__, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__) \
267     CsrWifiNmeApStationIndSendTo(dst__, CSR_WIFI_NME_IFACEQUEUE, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__)
268 
269 /*******************************************************************************
270 
271   NAME
272     CsrWifiNmeApStopReqSend
273 
274   DESCRIPTION
275     This primitive requests NME to stop the AP operation.
276 
277   PARAMETERS
278     queue        - Message Source Task Queue (Cfm's will be sent to this Queue)
279     interfaceTag - Interface identifier; unique identifier of an interface
280 
281 *******************************************************************************/
282 #define CsrWifiNmeApStopReqCreate(msg__, dst__, src__, interfaceTag__) \
283     msg__ = kmalloc(sizeof(CsrWifiNmeApStopReq), GFP_KERNEL); \
284     CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_NME_AP_PRIM, CSR_WIFI_NME_AP_STOP_REQ, dst__, src__); \
285     msg__->interfaceTag = (interfaceTag__);
286 
287 #define CsrWifiNmeApStopReqSendTo(dst__, src__, interfaceTag__) \
288     { \
289         CsrWifiNmeApStopReq *msg__; \
290         CsrWifiNmeApStopReqCreate(msg__, dst__, src__, interfaceTag__); \
291         CsrMsgTransport(dst__, CSR_WIFI_NME_AP_PRIM, msg__); \
292     }
293 
294 #define CsrWifiNmeApStopReqSend(src__, interfaceTag__) \
295     CsrWifiNmeApStopReqSendTo(CSR_WIFI_NME_IFACEQUEUE, src__, interfaceTag__)
296 
297 /*******************************************************************************
298 
299   NAME
300     CsrWifiNmeApStopIndSend
301 
302   DESCRIPTION
303     Indicates that AP operation had stopped because of some unrecoverable
304     error after AP operation was started successfully. NME sends this signal
305     after failing to restart the AP operation internally following an error
306 
307   PARAMETERS
308     queue        - Destination Task Queue
309     interfaceTag - Interface Identifier; unique identifier of an interface
310     apType       - Reports AP Type (P2PGO or AP)
311     status       - Error Status
312 
313 *******************************************************************************/
314 #define CsrWifiNmeApStopIndCreate(msg__, dst__, src__, interfaceTag__, apType__, status__) \
315     msg__ = kmalloc(sizeof(CsrWifiNmeApStopInd), GFP_KERNEL); \
316     CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_NME_AP_PRIM, CSR_WIFI_NME_AP_STOP_IND, dst__, src__); \
317     msg__->interfaceTag = (interfaceTag__); \
318     msg__->apType = (apType__); \
319     msg__->status = (status__);
320 
321 #define CsrWifiNmeApStopIndSendTo(dst__, src__, interfaceTag__, apType__, status__) \
322     { \
323         CsrWifiNmeApStopInd *msg__; \
324         CsrWifiNmeApStopIndCreate(msg__, dst__, src__, interfaceTag__, apType__, status__); \
325         CsrSchedMessagePut(dst__, CSR_WIFI_NME_AP_PRIM, msg__); \
326     }
327 
328 #define CsrWifiNmeApStopIndSend(dst__, interfaceTag__, apType__, status__) \
329     CsrWifiNmeApStopIndSendTo(dst__, CSR_WIFI_NME_IFACEQUEUE, interfaceTag__, apType__, status__)
330 
331 /*******************************************************************************
332 
333   NAME
334     CsrWifiNmeApStopCfmSend
335 
336   DESCRIPTION
337     This primitive confirms that the AP operation is stopped. NME shall send
338     this primitive in response to the request even if AP operation has
339     already been stopped
340 
341   PARAMETERS
342     queue        - Destination Task Queue
343     interfaceTag - Interface identifier; unique identifier of an interface
344     status       - Status of the request.
345 
346 *******************************************************************************/
347 #define CsrWifiNmeApStopCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
348     msg__ = kmalloc(sizeof(CsrWifiNmeApStopCfm), GFP_KERNEL); \
349     CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_NME_AP_PRIM, CSR_WIFI_NME_AP_STOP_CFM, dst__, src__); \
350     msg__->interfaceTag = (interfaceTag__); \
351     msg__->status = (status__);
352 
353 #define CsrWifiNmeApStopCfmSendTo(dst__, src__, interfaceTag__, status__) \
354     { \
355         CsrWifiNmeApStopCfm *msg__; \
356         CsrWifiNmeApStopCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
357         CsrSchedMessagePut(dst__, CSR_WIFI_NME_AP_PRIM, msg__); \
358     }
359 
360 #define CsrWifiNmeApStopCfmSend(dst__, interfaceTag__, status__) \
361     CsrWifiNmeApStopCfmSendTo(dst__, CSR_WIFI_NME_IFACEQUEUE, interfaceTag__, status__)
362 
363 /*******************************************************************************
364 
365   NAME
366     CsrWifiNmeApWmmParamUpdateReqSend
367 
368   DESCRIPTION
369     Application uses this primitive to update the WMM parameters
370 
371   PARAMETERS
372     queue         - Message Source Task Queue (Cfm's will be sent to this Queue)
373     wmmApParams   - WMM Access point parameters per access category. The array
374                     index corresponds to the ACI
375     wmmApBcParams - WMM station parameters per access category to be advertised
376                     in the beacons and probe response The array index
377                     corresponds to the ACI
378 
379 *******************************************************************************/
380 #define CsrWifiNmeApWmmParamUpdateReqCreate(msg__, dst__, src__, wmmApParams__, wmmApBcParams__) \
381     msg__ = kmalloc(sizeof(CsrWifiNmeApWmmParamUpdateReq), GFP_KERNEL); \
382     CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_NME_AP_PRIM, CSR_WIFI_NME_AP_WMM_PARAM_UPDATE_REQ, dst__, src__); \
383     memcpy(msg__->wmmApParams, (wmmApParams__), sizeof(CsrWifiSmeWmmAcParams) * 4); \
384     memcpy(msg__->wmmApBcParams, (wmmApBcParams__), sizeof(CsrWifiSmeWmmAcParams) * 4);
385 
386 #define CsrWifiNmeApWmmParamUpdateReqSendTo(dst__, src__, wmmApParams__, wmmApBcParams__) \
387     { \
388         CsrWifiNmeApWmmParamUpdateReq *msg__; \
389         CsrWifiNmeApWmmParamUpdateReqCreate(msg__, dst__, src__, wmmApParams__, wmmApBcParams__); \
390         CsrMsgTransport(dst__, CSR_WIFI_NME_AP_PRIM, msg__); \
391     }
392 
393 #define CsrWifiNmeApWmmParamUpdateReqSend(src__, wmmApParams__, wmmApBcParams__) \
394     CsrWifiNmeApWmmParamUpdateReqSendTo(CSR_WIFI_NME_IFACEQUEUE, src__, wmmApParams__, wmmApBcParams__)
395 
396 /*******************************************************************************
397 
398   NAME
399     CsrWifiNmeApWmmParamUpdateCfmSend
400 
401   DESCRIPTION
402     A confirm for for the WMM parameters update
403 
404   PARAMETERS
405     queue  - Destination Task Queue
406     status - Status of the request.
407 
408 *******************************************************************************/
409 #define CsrWifiNmeApWmmParamUpdateCfmCreate(msg__, dst__, src__, status__) \
410     msg__ = kmalloc(sizeof(CsrWifiNmeApWmmParamUpdateCfm), GFP_KERNEL); \
411     CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_NME_AP_PRIM, CSR_WIFI_NME_AP_WMM_PARAM_UPDATE_CFM, dst__, src__); \
412     msg__->status = (status__);
413 
414 #define CsrWifiNmeApWmmParamUpdateCfmSendTo(dst__, src__, status__) \
415     { \
416         CsrWifiNmeApWmmParamUpdateCfm *msg__; \
417         CsrWifiNmeApWmmParamUpdateCfmCreate(msg__, dst__, src__, status__); \
418         CsrSchedMessagePut(dst__, CSR_WIFI_NME_AP_PRIM, msg__); \
419     }
420 
421 #define CsrWifiNmeApWmmParamUpdateCfmSend(dst__, status__) \
422     CsrWifiNmeApWmmParamUpdateCfmSendTo(dst__, CSR_WIFI_NME_IFACEQUEUE, status__)
423 
424 /*******************************************************************************
425 
426   NAME
427     CsrWifiNmeApWpsRegisterReqSend
428 
429   DESCRIPTION
430     This primitive allows the NME to accept the WPS registration from an
431     enrollee. Such registration procedure can be cancelled by sending
432     CSR_WIFI_NME_WPS_CANCEL.request.
433 
434   PARAMETERS
435     queue                    - Message Source Task Queue (Cfm's will be sent to this Queue)
436     interfaceTag             - Interface Identifier; unique identifier of an
437                                interface
438     selectedDevicePasswordId - Selected password type
439     selectedConfigMethod     - Selected WPS configuration method type
440     pin                      - PIN value.
441                                Relevant if selected device password ID is PIN.4
442                                digit pin is passed by sending the pin digits in
443                                pin[0]..pin[3] and rest of the contents filled
444                                with '-'.
445 
446 *******************************************************************************/
447 #define CsrWifiNmeApWpsRegisterReqCreate(msg__, dst__, src__, interfaceTag__, selectedDevicePasswordId__, selectedConfigMethod__, pin__) \
448     msg__ = kmalloc(sizeof(CsrWifiNmeApWpsRegisterReq), GFP_KERNEL); \
449     CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_NME_AP_PRIM, CSR_WIFI_NME_AP_WPS_REGISTER_REQ, dst__, src__); \
450     msg__->interfaceTag = (interfaceTag__); \
451     msg__->selectedDevicePasswordId = (selectedDevicePasswordId__); \
452     msg__->selectedConfigMethod = (selectedConfigMethod__); \
453     memcpy(msg__->pin, (pin__), sizeof(u8) * 8);
454 
455 #define CsrWifiNmeApWpsRegisterReqSendTo(dst__, src__, interfaceTag__, selectedDevicePasswordId__, selectedConfigMethod__, pin__) \
456     { \
457         CsrWifiNmeApWpsRegisterReq *msg__; \
458         CsrWifiNmeApWpsRegisterReqCreate(msg__, dst__, src__, interfaceTag__, selectedDevicePasswordId__, selectedConfigMethod__, pin__); \
459         CsrMsgTransport(dst__, CSR_WIFI_NME_AP_PRIM, msg__); \
460     }
461 
462 #define CsrWifiNmeApWpsRegisterReqSend(src__, interfaceTag__, selectedDevicePasswordId__, selectedConfigMethod__, pin__) \
463     CsrWifiNmeApWpsRegisterReqSendTo(CSR_WIFI_NME_IFACEQUEUE, src__, interfaceTag__, selectedDevicePasswordId__, selectedConfigMethod__, pin__)
464 
465 /*******************************************************************************
466 
467   NAME
468     CsrWifiNmeApWpsRegisterCfmSend
469 
470   DESCRIPTION
471     This primitive reports the result of WPS procedure.
472 
473   PARAMETERS
474     queue        - Destination Task Queue
475     interfaceTag - Interface identifier; unique identifier of an interface
476     status       - Status of the request.
477 
478 *******************************************************************************/
479 #define CsrWifiNmeApWpsRegisterCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
480     msg__ = kmalloc(sizeof(CsrWifiNmeApWpsRegisterCfm), GFP_KERNEL); \
481     CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_NME_AP_PRIM, CSR_WIFI_NME_AP_WPS_REGISTER_CFM, dst__, src__); \
482     msg__->interfaceTag = (interfaceTag__); \
483     msg__->status = (status__);
484 
485 #define CsrWifiNmeApWpsRegisterCfmSendTo(dst__, src__, interfaceTag__, status__) \
486     { \
487         CsrWifiNmeApWpsRegisterCfm *msg__; \
488         CsrWifiNmeApWpsRegisterCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
489         CsrSchedMessagePut(dst__, CSR_WIFI_NME_AP_PRIM, msg__); \
490     }
491 
492 #define CsrWifiNmeApWpsRegisterCfmSend(dst__, interfaceTag__, status__) \
493     CsrWifiNmeApWpsRegisterCfmSendTo(dst__, CSR_WIFI_NME_IFACEQUEUE, interfaceTag__, status__)
494 
495 #endif /* CSR_WIFI_NME_AP_LIB_H__ */
496