spi/build: Remove SPI_SIRF from compile test
[deliverable/linux.git] / drivers / staging / csr / csr_wifi_sme_ap_lib.h
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_SME_AP_LIB_H__
14 #define CSR_WIFI_SME_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_sme_ap_prim.h"
23 #include "csr_wifi_sme_task.h"
24
25 #ifndef CSR_WIFI_AP_ENABLE
26 #error CSR_WIFI_AP_ENABLE MUST be defined inorder to use csr_wifi_sme_ap_lib.h
27 #endif
28
29 /*----------------------------------------------------------------------------*
30 * CsrWifiSmeApFreeUpstreamMessageContents
31 *
32 * DESCRIPTION
33 * Free the allocated memory in a CSR_WIFI_SME_AP upstream message. Does not
34 * free the message itself, and can only be used for upstream messages.
35 *
36 * PARAMETERS
37 * Deallocates the resources in a CSR_WIFI_SME_AP upstream message
38 *----------------------------------------------------------------------------*/
39 void CsrWifiSmeApFreeUpstreamMessageContents(u16 eventClass, void *message);
40
41 /*----------------------------------------------------------------------------*
42 * CsrWifiSmeApFreeDownstreamMessageContents
43 *
44 * DESCRIPTION
45 * Free the allocated memory in a CSR_WIFI_SME_AP downstream message. Does not
46 * free the message itself, and can only be used for downstream messages.
47 *
48 * PARAMETERS
49 * Deallocates the resources in a CSR_WIFI_SME_AP downstream message
50 *----------------------------------------------------------------------------*/
51 void CsrWifiSmeApFreeDownstreamMessageContents(u16 eventClass, void *message);
52
53 /*----------------------------------------------------------------------------*
54 * Enum to string functions
55 *----------------------------------------------------------------------------*/
56 const char* CsrWifiSmeApAccessTypeToString(CsrWifiSmeApAccessType value);
57 const char* CsrWifiSmeApAuthSupportToString(CsrWifiSmeApAuthSupport value);
58 const char* CsrWifiSmeApAuthTypeToString(CsrWifiSmeApAuthType value);
59 const char* CsrWifiSmeApDirectionToString(CsrWifiSmeApDirection value);
60 const char* CsrWifiSmeApPhySupportToString(CsrWifiSmeApPhySupport value);
61 const char* CsrWifiSmeApTypeToString(CsrWifiSmeApType value);
62
63
64 /*----------------------------------------------------------------------------*
65 * CsrPrim Type toString function.
66 * Converts a message type to the String name of the Message
67 *----------------------------------------------------------------------------*/
68 const char* CsrWifiSmeApPrimTypeToString(CsrPrim msgType);
69
70 /*----------------------------------------------------------------------------*
71 * Lookup arrays for PrimType name Strings
72 *----------------------------------------------------------------------------*/
73 extern const char *CsrWifiSmeApUpstreamPrimNames[CSR_WIFI_SME_AP_PRIM_UPSTREAM_COUNT];
74 extern const char *CsrWifiSmeApDownstreamPrimNames[CSR_WIFI_SME_AP_PRIM_DOWNSTREAM_COUNT];
75
76 /*******************************************************************************
77
78 NAME
79 CsrWifiSmeApActiveBaGetReqSend
80
81 DESCRIPTION
82 This primitive used to retrieve information related to the active block
83 ack sessions
84
85 PARAMETERS
86 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
87 interfaceTag -
88
89 *******************************************************************************/
90 #define CsrWifiSmeApActiveBaGetReqCreate(msg__, dst__, src__, interfaceTag__) \
91 msg__ = kmalloc(sizeof(CsrWifiSmeApActiveBaGetReq), GFP_KERNEL); \
92 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_ACTIVE_BA_GET_REQ, dst__, src__); \
93 msg__->interfaceTag = (interfaceTag__);
94
95 #define CsrWifiSmeApActiveBaGetReqSendTo(dst__, src__, interfaceTag__) \
96 { \
97 CsrWifiSmeApActiveBaGetReq *msg__; \
98 CsrWifiSmeApActiveBaGetReqCreate(msg__, dst__, src__, interfaceTag__); \
99 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
100 }
101
102 #define CsrWifiSmeApActiveBaGetReqSend(src__, interfaceTag__) \
103 CsrWifiSmeApActiveBaGetReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__)
104
105 /*******************************************************************************
106
107 NAME
108 CsrWifiSmeApActiveBaGetCfmSend
109
110 DESCRIPTION
111 This primitive carries the information related to the active ba sessions
112
113 PARAMETERS
114 queue - Destination Task Queue
115 interfaceTag -
116 status - Reports the result of the request
117 activeBaCount - Number of active block ack session
118 activeBaSessions - Points to a buffer containing an array of
119 CsrWifiSmeApBaSession structures.
120
121 *******************************************************************************/
122 #define CsrWifiSmeApActiveBaGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, activeBaCount__, activeBaSessions__) \
123 msg__ = kmalloc(sizeof(CsrWifiSmeApActiveBaGetCfm), GFP_KERNEL); \
124 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_ACTIVE_BA_GET_CFM, dst__, src__); \
125 msg__->interfaceTag = (interfaceTag__); \
126 msg__->status = (status__); \
127 msg__->activeBaCount = (activeBaCount__); \
128 msg__->activeBaSessions = (activeBaSessions__);
129
130 #define CsrWifiSmeApActiveBaGetCfmSendTo(dst__, src__, interfaceTag__, status__, activeBaCount__, activeBaSessions__) \
131 { \
132 CsrWifiSmeApActiveBaGetCfm *msg__; \
133 CsrWifiSmeApActiveBaGetCfmCreate(msg__, dst__, src__, interfaceTag__, status__, activeBaCount__, activeBaSessions__); \
134 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
135 }
136
137 #define CsrWifiSmeApActiveBaGetCfmSend(dst__, interfaceTag__, status__, activeBaCount__, activeBaSessions__) \
138 CsrWifiSmeApActiveBaGetCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, activeBaCount__, activeBaSessions__)
139
140 /*******************************************************************************
141
142 NAME
143 CsrWifiSmeApBaDeleteReqSend
144
145 DESCRIPTION
146 This primitive is used to delete an active block ack session
147
148 PARAMETERS
149 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
150 interfaceTag -
151 reason -
152 baSession - BA session to be deleted
153
154 *******************************************************************************/
155 #define CsrWifiSmeApBaDeleteReqCreate(msg__, dst__, src__, interfaceTag__, reason__, baSession__) \
156 msg__ = kmalloc(sizeof(CsrWifiSmeApBaDeleteReq), GFP_KERNEL); \
157 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BA_DELETE_REQ, dst__, src__); \
158 msg__->interfaceTag = (interfaceTag__); \
159 msg__->reason = (reason__); \
160 msg__->baSession = (baSession__);
161
162 #define CsrWifiSmeApBaDeleteReqSendTo(dst__, src__, interfaceTag__, reason__, baSession__) \
163 { \
164 CsrWifiSmeApBaDeleteReq *msg__; \
165 CsrWifiSmeApBaDeleteReqCreate(msg__, dst__, src__, interfaceTag__, reason__, baSession__); \
166 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
167 }
168
169 #define CsrWifiSmeApBaDeleteReqSend(src__, interfaceTag__, reason__, baSession__) \
170 CsrWifiSmeApBaDeleteReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__, reason__, baSession__)
171
172 /*******************************************************************************
173
174 NAME
175 CsrWifiSmeApBaDeleteCfmSend
176
177 DESCRIPTION
178 This primitive confirms the BA is deleted
179
180 PARAMETERS
181 queue - Destination Task Queue
182 interfaceTag -
183 status - Reports the result of the request
184 baSession - deleted BA session
185
186 *******************************************************************************/
187 #define CsrWifiSmeApBaDeleteCfmCreate(msg__, dst__, src__, interfaceTag__, status__, baSession__) \
188 msg__ = kmalloc(sizeof(CsrWifiSmeApBaDeleteCfm), GFP_KERNEL); \
189 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BA_DELETE_CFM, dst__, src__); \
190 msg__->interfaceTag = (interfaceTag__); \
191 msg__->status = (status__); \
192 msg__->baSession = (baSession__);
193
194 #define CsrWifiSmeApBaDeleteCfmSendTo(dst__, src__, interfaceTag__, status__, baSession__) \
195 { \
196 CsrWifiSmeApBaDeleteCfm *msg__; \
197 CsrWifiSmeApBaDeleteCfmCreate(msg__, dst__, src__, interfaceTag__, status__, baSession__); \
198 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
199 }
200
201 #define CsrWifiSmeApBaDeleteCfmSend(dst__, interfaceTag__, status__, baSession__) \
202 CsrWifiSmeApBaDeleteCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, baSession__)
203
204 /*******************************************************************************
205
206 NAME
207 CsrWifiSmeApBeaconingStartReqSend
208
209 DESCRIPTION
210 This primitive requests the SME to start AP or GO functionality
211
212 PARAMETERS
213 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
214 interfaceTag -
215 initialPresence - Set to 0, if Not in a group fomration phase, set to 1 ,
216 during group formation phase
217 apType - apType : Legacy AP or P2PGO
218 cloakSsid - cloakSsid flag.
219 ssid - ssid.
220 ifIndex - Radio Interface
221 channel - channel.
222 maxConnections - Maximum Stations + P2PClients allowed
223 apCredentials - AP security credeitals used to advertise in beacon /probe
224 response
225 smeApConfig - AP configuration
226 p2pGoParam - P2P specific GO parameters. Ignored if it is a leagacy AP
227
228 *******************************************************************************/
229 #define CsrWifiSmeApBeaconingStartReqCreate(msg__, dst__, src__, interfaceTag__, initialPresence__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, maxConnections__, apCredentials__, smeApConfig__, p2pGoParam__) \
230 msg__ = kmalloc(sizeof(CsrWifiSmeApBeaconingStartReq), GFP_KERNEL); \
231 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BEACONING_START_REQ, dst__, src__); \
232 msg__->interfaceTag = (interfaceTag__); \
233 msg__->initialPresence = (initialPresence__); \
234 msg__->apType = (apType__); \
235 msg__->cloakSsid = (cloakSsid__); \
236 msg__->ssid = (ssid__); \
237 msg__->ifIndex = (ifIndex__); \
238 msg__->channel = (channel__); \
239 msg__->maxConnections = (maxConnections__); \
240 msg__->apCredentials = (apCredentials__); \
241 msg__->smeApConfig = (smeApConfig__); \
242 msg__->p2pGoParam = (p2pGoParam__);
243
244 #define CsrWifiSmeApBeaconingStartReqSendTo(dst__, src__, interfaceTag__, initialPresence__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, maxConnections__, apCredentials__, smeApConfig__, p2pGoParam__) \
245 { \
246 CsrWifiSmeApBeaconingStartReq *msg__; \
247 CsrWifiSmeApBeaconingStartReqCreate(msg__, dst__, src__, interfaceTag__, initialPresence__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, maxConnections__, apCredentials__, smeApConfig__, p2pGoParam__); \
248 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
249 }
250
251 #define CsrWifiSmeApBeaconingStartReqSend(src__, interfaceTag__, initialPresence__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, maxConnections__, apCredentials__, smeApConfig__, p2pGoParam__) \
252 CsrWifiSmeApBeaconingStartReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__, initialPresence__, apType__, cloakSsid__, ssid__, ifIndex__, channel__, maxConnections__, apCredentials__, smeApConfig__, p2pGoParam__)
253
254 /*******************************************************************************
255
256 NAME
257 CsrWifiSmeApBeaconingStartCfmSend
258
259 DESCRIPTION
260 This primitive confirms the completion of the request along with the
261 status
262
263 PARAMETERS
264 queue - Destination Task Queue
265 interfaceTag -
266 status -
267 secIeLength -
268 secIe -
269
270 *******************************************************************************/
271 #define CsrWifiSmeApBeaconingStartCfmCreate(msg__, dst__, src__, interfaceTag__, status__, secIeLength__, secIe__) \
272 msg__ = kmalloc(sizeof(CsrWifiSmeApBeaconingStartCfm), GFP_KERNEL); \
273 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BEACONING_START_CFM, dst__, src__); \
274 msg__->interfaceTag = (interfaceTag__); \
275 msg__->status = (status__); \
276 msg__->secIeLength = (secIeLength__); \
277 msg__->secIe = (secIe__);
278
279 #define CsrWifiSmeApBeaconingStartCfmSendTo(dst__, src__, interfaceTag__, status__, secIeLength__, secIe__) \
280 { \
281 CsrWifiSmeApBeaconingStartCfm *msg__; \
282 CsrWifiSmeApBeaconingStartCfmCreate(msg__, dst__, src__, interfaceTag__, status__, secIeLength__, secIe__); \
283 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
284 }
285
286 #define CsrWifiSmeApBeaconingStartCfmSend(dst__, interfaceTag__, status__, secIeLength__, secIe__) \
287 CsrWifiSmeApBeaconingStartCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, secIeLength__, secIe__)
288
289 /*******************************************************************************
290
291 NAME
292 CsrWifiSmeApBeaconingStopReqSend
293
294 DESCRIPTION
295 This primitive requests the SME to STOP AP or P2PGO operation
296
297 PARAMETERS
298 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
299 interfaceTag -
300
301 *******************************************************************************/
302 #define CsrWifiSmeApBeaconingStopReqCreate(msg__, dst__, src__, interfaceTag__) \
303 msg__ = kmalloc(sizeof(CsrWifiSmeApBeaconingStopReq), GFP_KERNEL); \
304 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BEACONING_STOP_REQ, dst__, src__); \
305 msg__->interfaceTag = (interfaceTag__);
306
307 #define CsrWifiSmeApBeaconingStopReqSendTo(dst__, src__, interfaceTag__) \
308 { \
309 CsrWifiSmeApBeaconingStopReq *msg__; \
310 CsrWifiSmeApBeaconingStopReqCreate(msg__, dst__, src__, interfaceTag__); \
311 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
312 }
313
314 #define CsrWifiSmeApBeaconingStopReqSend(src__, interfaceTag__) \
315 CsrWifiSmeApBeaconingStopReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__)
316
317 /*******************************************************************************
318
319 NAME
320 CsrWifiSmeApBeaconingStopCfmSend
321
322 DESCRIPTION
323 This primitive confirms AP or P2PGO operation is terminated
324
325 PARAMETERS
326 queue - Destination Task Queue
327 interfaceTag -
328 status -
329
330 *******************************************************************************/
331 #define CsrWifiSmeApBeaconingStopCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
332 msg__ = kmalloc(sizeof(CsrWifiSmeApBeaconingStopCfm), GFP_KERNEL); \
333 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_BEACONING_STOP_CFM, dst__, src__); \
334 msg__->interfaceTag = (interfaceTag__); \
335 msg__->status = (status__);
336
337 #define CsrWifiSmeApBeaconingStopCfmSendTo(dst__, src__, interfaceTag__, status__) \
338 { \
339 CsrWifiSmeApBeaconingStopCfm *msg__; \
340 CsrWifiSmeApBeaconingStopCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
341 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
342 }
343
344 #define CsrWifiSmeApBeaconingStopCfmSend(dst__, interfaceTag__, status__) \
345 CsrWifiSmeApBeaconingStopCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
346
347 /*******************************************************************************
348
349 NAME
350 CsrWifiSmeApErrorIndSend
351
352 DESCRIPTION
353 This primitve is sent by SME to indicate some error in AP operationi
354 after AP operations were started successfully and continuing the AP
355 operation may lead to undesired behaviour. It is the responsibility of
356 the upper layers to stop AP operation if needed
357
358 PARAMETERS
359 queue - Destination Task Queue
360 interfaceTag - Range 0-1
361 apType -
362 status - Contains the error status
363
364 *******************************************************************************/
365 #define CsrWifiSmeApErrorIndCreate(msg__, dst__, src__, interfaceTag__, apType__, status__) \
366 msg__ = kmalloc(sizeof(CsrWifiSmeApErrorInd), GFP_KERNEL); \
367 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_ERROR_IND, dst__, src__); \
368 msg__->interfaceTag = (interfaceTag__); \
369 msg__->apType = (apType__); \
370 msg__->status = (status__);
371
372 #define CsrWifiSmeApErrorIndSendTo(dst__, src__, interfaceTag__, apType__, status__) \
373 { \
374 CsrWifiSmeApErrorInd *msg__; \
375 CsrWifiSmeApErrorIndCreate(msg__, dst__, src__, interfaceTag__, apType__, status__); \
376 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
377 }
378
379 #define CsrWifiSmeApErrorIndSend(dst__, interfaceTag__, apType__, status__) \
380 CsrWifiSmeApErrorIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, apType__, status__)
381
382 /*******************************************************************************
383
384 NAME
385 CsrWifiSmeApStaConnectStartIndSend
386
387 DESCRIPTION
388 This primitive indicates that a stations request to join the group/BSS is
389 accepted
390
391 PARAMETERS
392 queue - Destination Task Queue
393 interfaceTag -
394 peerMacAddress -
395
396 *******************************************************************************/
397 #define CsrWifiSmeApStaConnectStartIndCreate(msg__, dst__, src__, interfaceTag__, peerMacAddress__) \
398 msg__ = kmalloc(sizeof(CsrWifiSmeApStaConnectStartInd), GFP_KERNEL); \
399 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_STA_CONNECT_START_IND, dst__, src__); \
400 msg__->interfaceTag = (interfaceTag__); \
401 msg__->peerMacAddress = (peerMacAddress__);
402
403 #define CsrWifiSmeApStaConnectStartIndSendTo(dst__, src__, interfaceTag__, peerMacAddress__) \
404 { \
405 CsrWifiSmeApStaConnectStartInd *msg__; \
406 CsrWifiSmeApStaConnectStartIndCreate(msg__, dst__, src__, interfaceTag__, peerMacAddress__); \
407 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
408 }
409
410 #define CsrWifiSmeApStaConnectStartIndSend(dst__, interfaceTag__, peerMacAddress__) \
411 CsrWifiSmeApStaConnectStartIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, peerMacAddress__)
412
413 /*******************************************************************************
414
415 NAME
416 CsrWifiSmeApStaDisconnectReqSend
417
418 DESCRIPTION
419 This primitive tells SME to deauth ot disassociate a particular station
420 within BSS
421
422 PARAMETERS
423 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
424 interfaceTag -
425 deauthReason -
426 disassocReason -
427 peerMacaddress -
428 keepBlocking - If TRUE, the station is blocked. If FALSE and the station
429 is connected, disconnect the station. If FALSE and the
430 station is not connected, no action is taken.
431
432 *******************************************************************************/
433 #define CsrWifiSmeApStaDisconnectReqCreate(msg__, dst__, src__, interfaceTag__, deauthReason__, disassocReason__, peerMacaddress__, keepBlocking__) \
434 msg__ = kmalloc(sizeof(CsrWifiSmeApStaDisconnectReq), GFP_KERNEL); \
435 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_STA_DISCONNECT_REQ, dst__, src__); \
436 msg__->interfaceTag = (interfaceTag__); \
437 msg__->deauthReason = (deauthReason__); \
438 msg__->disassocReason = (disassocReason__); \
439 msg__->peerMacaddress = (peerMacaddress__); \
440 msg__->keepBlocking = (keepBlocking__);
441
442 #define CsrWifiSmeApStaDisconnectReqSendTo(dst__, src__, interfaceTag__, deauthReason__, disassocReason__, peerMacaddress__, keepBlocking__) \
443 { \
444 CsrWifiSmeApStaDisconnectReq *msg__; \
445 CsrWifiSmeApStaDisconnectReqCreate(msg__, dst__, src__, interfaceTag__, deauthReason__, disassocReason__, peerMacaddress__, keepBlocking__); \
446 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
447 }
448
449 #define CsrWifiSmeApStaDisconnectReqSend(src__, interfaceTag__, deauthReason__, disassocReason__, peerMacaddress__, keepBlocking__) \
450 CsrWifiSmeApStaDisconnectReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__, deauthReason__, disassocReason__, peerMacaddress__, keepBlocking__)
451
452 /*******************************************************************************
453
454 NAME
455 CsrWifiSmeApStaDisconnectCfmSend
456
457 DESCRIPTION
458 This primitive confirms the station is disconnected
459
460 PARAMETERS
461 queue - Destination Task Queue
462 interfaceTag -
463 status -
464 peerMacaddress -
465
466 *******************************************************************************/
467 #define CsrWifiSmeApStaDisconnectCfmCreate(msg__, dst__, src__, interfaceTag__, status__, peerMacaddress__) \
468 msg__ = kmalloc(sizeof(CsrWifiSmeApStaDisconnectCfm), GFP_KERNEL); \
469 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_STA_DISCONNECT_CFM, dst__, src__); \
470 msg__->interfaceTag = (interfaceTag__); \
471 msg__->status = (status__); \
472 msg__->peerMacaddress = (peerMacaddress__);
473
474 #define CsrWifiSmeApStaDisconnectCfmSendTo(dst__, src__, interfaceTag__, status__, peerMacaddress__) \
475 { \
476 CsrWifiSmeApStaDisconnectCfm *msg__; \
477 CsrWifiSmeApStaDisconnectCfmCreate(msg__, dst__, src__, interfaceTag__, status__, peerMacaddress__); \
478 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
479 }
480
481 #define CsrWifiSmeApStaDisconnectCfmSend(dst__, interfaceTag__, status__, peerMacaddress__) \
482 CsrWifiSmeApStaDisconnectCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__, peerMacaddress__)
483
484 /*******************************************************************************
485
486 NAME
487 CsrWifiSmeApStaNotifyIndSend
488
489 DESCRIPTION
490 This primitive indicates that a station has joined or a previously joined
491 station has left the BSS/group
492
493 PARAMETERS
494 queue - Destination Task Queue
495 interfaceTag -
496 mediaStatus -
497 peerMacAddress -
498 peerDeviceAddress -
499 disassocReason -
500 deauthReason -
501 WpsRegistration -
502 secIeLength -
503 secIe -
504 groupKeyId -
505 seqNumber -
506
507 *******************************************************************************/
508 #define CsrWifiSmeApStaNotifyIndCreate(msg__, dst__, src__, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__, disassocReason__, deauthReason__, WpsRegistration__, secIeLength__, secIe__, groupKeyId__, seqNumber__) \
509 msg__ = kmalloc(sizeof(CsrWifiSmeApStaNotifyInd), GFP_KERNEL); \
510 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_STA_NOTIFY_IND, dst__, src__); \
511 msg__->interfaceTag = (interfaceTag__); \
512 msg__->mediaStatus = (mediaStatus__); \
513 msg__->peerMacAddress = (peerMacAddress__); \
514 msg__->peerDeviceAddress = (peerDeviceAddress__); \
515 msg__->disassocReason = (disassocReason__); \
516 msg__->deauthReason = (deauthReason__); \
517 msg__->WpsRegistration = (WpsRegistration__); \
518 msg__->secIeLength = (secIeLength__); \
519 msg__->secIe = (secIe__); \
520 msg__->groupKeyId = (groupKeyId__); \
521 memcpy(msg__->seqNumber, (seqNumber__), sizeof(u16) * 8);
522
523 #define CsrWifiSmeApStaNotifyIndSendTo(dst__, src__, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__, disassocReason__, deauthReason__, WpsRegistration__, secIeLength__, secIe__, groupKeyId__, seqNumber__) \
524 { \
525 CsrWifiSmeApStaNotifyInd *msg__; \
526 CsrWifiSmeApStaNotifyIndCreate(msg__, dst__, src__, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__, disassocReason__, deauthReason__, WpsRegistration__, secIeLength__, secIe__, groupKeyId__, seqNumber__); \
527 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
528 }
529
530 #define CsrWifiSmeApStaNotifyIndSend(dst__, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__, disassocReason__, deauthReason__, WpsRegistration__, secIeLength__, secIe__, groupKeyId__, seqNumber__) \
531 CsrWifiSmeApStaNotifyIndSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, mediaStatus__, peerMacAddress__, peerDeviceAddress__, disassocReason__, deauthReason__, WpsRegistration__, secIeLength__, secIe__, groupKeyId__, seqNumber__)
532
533 /*******************************************************************************
534
535 NAME
536 CsrWifiSmeApWmmParamUpdateReqSend
537
538 DESCRIPTION
539 Application uses this primitive to update the WMM parameters on the fly
540
541 PARAMETERS
542 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
543 interfaceTag -
544 wmmApParams - WMM parameters to be used for local firmware queue
545 configuration
546 wmmApBcParams - WMM parameters to be advertised in beacon/probe response
547
548 *******************************************************************************/
549 #define CsrWifiSmeApWmmParamUpdateReqCreate(msg__, dst__, src__, interfaceTag__, wmmApParams__, wmmApBcParams__) \
550 msg__ = kmalloc(sizeof(CsrWifiSmeApWmmParamUpdateReq), GFP_KERNEL); \
551 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WMM_PARAM_UPDATE_REQ, dst__, src__); \
552 msg__->interfaceTag = (interfaceTag__); \
553 memcpy(msg__->wmmApParams, (wmmApParams__), sizeof(CsrWifiSmeWmmAcParams) * 4); \
554 memcpy(msg__->wmmApBcParams, (wmmApBcParams__), sizeof(CsrWifiSmeWmmAcParams) * 4);
555
556 #define CsrWifiSmeApWmmParamUpdateReqSendTo(dst__, src__, interfaceTag__, wmmApParams__, wmmApBcParams__) \
557 { \
558 CsrWifiSmeApWmmParamUpdateReq *msg__; \
559 CsrWifiSmeApWmmParamUpdateReqCreate(msg__, dst__, src__, interfaceTag__, wmmApParams__, wmmApBcParams__); \
560 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
561 }
562
563 #define CsrWifiSmeApWmmParamUpdateReqSend(src__, interfaceTag__, wmmApParams__, wmmApBcParams__) \
564 CsrWifiSmeApWmmParamUpdateReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__, wmmApParams__, wmmApBcParams__)
565
566 /*******************************************************************************
567
568 NAME
569 CsrWifiSmeApWmmParamUpdateCfmSend
570
571 DESCRIPTION
572 A confirm for CSR_WIFI_SME_AP_WMM_PARAM_UPDATE.request
573
574 PARAMETERS
575 queue - Destination Task Queue
576 interfaceTag -
577 status -
578
579 *******************************************************************************/
580 #define CsrWifiSmeApWmmParamUpdateCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
581 msg__ = kmalloc(sizeof(CsrWifiSmeApWmmParamUpdateCfm), GFP_KERNEL); \
582 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WMM_PARAM_UPDATE_CFM, dst__, src__); \
583 msg__->interfaceTag = (interfaceTag__); \
584 msg__->status = (status__);
585
586 #define CsrWifiSmeApWmmParamUpdateCfmSendTo(dst__, src__, interfaceTag__, status__) \
587 { \
588 CsrWifiSmeApWmmParamUpdateCfm *msg__; \
589 CsrWifiSmeApWmmParamUpdateCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
590 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
591 }
592
593 #define CsrWifiSmeApWmmParamUpdateCfmSend(dst__, interfaceTag__, status__) \
594 CsrWifiSmeApWmmParamUpdateCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
595
596 /*******************************************************************************
597
598 NAME
599 CsrWifiSmeApWpsConfigurationReqSend
600
601 DESCRIPTION
602 This primitive passes the WPS information for the device to SME. This may
603 be accepted only if no interface is active.
604
605 PARAMETERS
606 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
607 wpsConfig - WPS config.
608
609 *******************************************************************************/
610 #define CsrWifiSmeApWpsConfigurationReqCreate(msg__, dst__, src__, wpsConfig__) \
611 msg__ = kmalloc(sizeof(CsrWifiSmeApWpsConfigurationReq), GFP_KERNEL); \
612 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_CONFIGURATION_REQ, dst__, src__); \
613 msg__->wpsConfig = (wpsConfig__);
614
615 #define CsrWifiSmeApWpsConfigurationReqSendTo(dst__, src__, wpsConfig__) \
616 { \
617 CsrWifiSmeApWpsConfigurationReq *msg__; \
618 CsrWifiSmeApWpsConfigurationReqCreate(msg__, dst__, src__, wpsConfig__); \
619 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
620 }
621
622 #define CsrWifiSmeApWpsConfigurationReqSend(src__, wpsConfig__) \
623 CsrWifiSmeApWpsConfigurationReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, wpsConfig__)
624
625 /*******************************************************************************
626
627 NAME
628 CsrWifiSmeApWpsConfigurationCfmSend
629
630 DESCRIPTION
631 Confirm.
632
633 PARAMETERS
634 queue - Destination Task Queue
635 status - Status of the request.
636
637 *******************************************************************************/
638 #define CsrWifiSmeApWpsConfigurationCfmCreate(msg__, dst__, src__, status__) \
639 msg__ = kmalloc(sizeof(CsrWifiSmeApWpsConfigurationCfm), GFP_KERNEL); \
640 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_CONFIGURATION_CFM, dst__, src__); \
641 msg__->status = (status__);
642
643 #define CsrWifiSmeApWpsConfigurationCfmSendTo(dst__, src__, status__) \
644 { \
645 CsrWifiSmeApWpsConfigurationCfm *msg__; \
646 CsrWifiSmeApWpsConfigurationCfmCreate(msg__, dst__, src__, status__); \
647 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
648 }
649
650 #define CsrWifiSmeApWpsConfigurationCfmSend(dst__, status__) \
651 CsrWifiSmeApWpsConfigurationCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, status__)
652
653 /*******************************************************************************
654
655 NAME
656 CsrWifiSmeApWpsRegistrationFinishedReqSend
657
658 DESCRIPTION
659 This primitive tells SME that WPS registration procedure has finished
660
661 PARAMETERS
662 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
663 interfaceTag -
664
665 *******************************************************************************/
666 #define CsrWifiSmeApWpsRegistrationFinishedReqCreate(msg__, dst__, src__, interfaceTag__) \
667 msg__ = kmalloc(sizeof(CsrWifiSmeApWpsRegistrationFinishedReq), GFP_KERNEL); \
668 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_REGISTRATION_FINISHED_REQ, dst__, src__); \
669 msg__->interfaceTag = (interfaceTag__);
670
671 #define CsrWifiSmeApWpsRegistrationFinishedReqSendTo(dst__, src__, interfaceTag__) \
672 { \
673 CsrWifiSmeApWpsRegistrationFinishedReq *msg__; \
674 CsrWifiSmeApWpsRegistrationFinishedReqCreate(msg__, dst__, src__, interfaceTag__); \
675 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
676 }
677
678 #define CsrWifiSmeApWpsRegistrationFinishedReqSend(src__, interfaceTag__) \
679 CsrWifiSmeApWpsRegistrationFinishedReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__)
680
681 /*******************************************************************************
682
683 NAME
684 CsrWifiSmeApWpsRegistrationFinishedCfmSend
685
686 DESCRIPTION
687 A confirm for UNIFI_MGT_AP_WPS_REGISTRATION_FINISHED.request
688
689 PARAMETERS
690 queue - Destination Task Queue
691 interfaceTag -
692 status -
693
694 *******************************************************************************/
695 #define CsrWifiSmeApWpsRegistrationFinishedCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
696 msg__ = kmalloc(sizeof(CsrWifiSmeApWpsRegistrationFinishedCfm), GFP_KERNEL); \
697 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_REGISTRATION_FINISHED_CFM, dst__, src__); \
698 msg__->interfaceTag = (interfaceTag__); \
699 msg__->status = (status__);
700
701 #define CsrWifiSmeApWpsRegistrationFinishedCfmSendTo(dst__, src__, interfaceTag__, status__) \
702 { \
703 CsrWifiSmeApWpsRegistrationFinishedCfm *msg__; \
704 CsrWifiSmeApWpsRegistrationFinishedCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
705 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
706 }
707
708 #define CsrWifiSmeApWpsRegistrationFinishedCfmSend(dst__, interfaceTag__, status__) \
709 CsrWifiSmeApWpsRegistrationFinishedCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
710
711 /*******************************************************************************
712
713 NAME
714 CsrWifiSmeApWpsRegistrationStartedReqSend
715
716 DESCRIPTION
717 This primitive tells SME that WPS registration procedure has started
718
719 PARAMETERS
720 queue - Message Source Task Queue (Cfm's will be sent to this Queue)
721 interfaceTag -
722 SelectedDevicePasswordId -
723 SelectedconfigMethod -
724
725 *******************************************************************************/
726 #define CsrWifiSmeApWpsRegistrationStartedReqCreate(msg__, dst__, src__, interfaceTag__, SelectedDevicePasswordId__, SelectedconfigMethod__) \
727 msg__ = kmalloc(sizeof(CsrWifiSmeApWpsRegistrationStartedReq), GFP_KERNEL); \
728 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_REGISTRATION_STARTED_REQ, dst__, src__); \
729 msg__->interfaceTag = (interfaceTag__); \
730 msg__->SelectedDevicePasswordId = (SelectedDevicePasswordId__); \
731 msg__->SelectedconfigMethod = (SelectedconfigMethod__);
732
733 #define CsrWifiSmeApWpsRegistrationStartedReqSendTo(dst__, src__, interfaceTag__, SelectedDevicePasswordId__, SelectedconfigMethod__) \
734 { \
735 CsrWifiSmeApWpsRegistrationStartedReq *msg__; \
736 CsrWifiSmeApWpsRegistrationStartedReqCreate(msg__, dst__, src__, interfaceTag__, SelectedDevicePasswordId__, SelectedconfigMethod__); \
737 CsrMsgTransport(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
738 }
739
740 #define CsrWifiSmeApWpsRegistrationStartedReqSend(src__, interfaceTag__, SelectedDevicePasswordId__, SelectedconfigMethod__) \
741 CsrWifiSmeApWpsRegistrationStartedReqSendTo(CSR_WIFI_SME_IFACEQUEUE, src__, interfaceTag__, SelectedDevicePasswordId__, SelectedconfigMethod__)
742
743 /*******************************************************************************
744
745 NAME
746 CsrWifiSmeApWpsRegistrationStartedCfmSend
747
748 DESCRIPTION
749 A confirm for UNIFI_MGT_AP_WPS_REGISTRATION_STARTED.request
750
751 PARAMETERS
752 queue - Destination Task Queue
753 interfaceTag -
754 status -
755
756 *******************************************************************************/
757 #define CsrWifiSmeApWpsRegistrationStartedCfmCreate(msg__, dst__, src__, interfaceTag__, status__) \
758 msg__ = kmalloc(sizeof(CsrWifiSmeApWpsRegistrationStartedCfm), GFP_KERNEL); \
759 CsrWifiFsmEventInit(&msg__->common, CSR_WIFI_SME_AP_PRIM, CSR_WIFI_SME_AP_WPS_REGISTRATION_STARTED_CFM, dst__, src__); \
760 msg__->interfaceTag = (interfaceTag__); \
761 msg__->status = (status__);
762
763 #define CsrWifiSmeApWpsRegistrationStartedCfmSendTo(dst__, src__, interfaceTag__, status__) \
764 { \
765 CsrWifiSmeApWpsRegistrationStartedCfm *msg__; \
766 CsrWifiSmeApWpsRegistrationStartedCfmCreate(msg__, dst__, src__, interfaceTag__, status__); \
767 CsrSchedMessagePut(dst__, CSR_WIFI_SME_AP_PRIM, msg__); \
768 }
769
770 #define CsrWifiSmeApWpsRegistrationStartedCfmSend(dst__, interfaceTag__, status__) \
771 CsrWifiSmeApWpsRegistrationStartedCfmSendTo(dst__, CSR_WIFI_SME_IFACEQUEUE, interfaceTag__, status__)
772
773
774 #endif /* CSR_WIFI_SME_AP_LIB_H__ */
This page took 0.107724 seconds and 5 git commands to generate.