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