• 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_PRIM_H__
14 #define CSR_WIFI_NME_AP_PRIM_H__
15 
16 #include <linux/types.h>
17 #include "csr_prim_defs.h"
18 #include "csr_sched.h"
19 #include "csr_wifi_common.h"
20 #include "csr_result.h"
21 #include "csr_wifi_fsm_event.h"
22 #include "csr_wifi_sme_ap_prim.h"
23 #include "csr_wifi_nme_prim.h"
24 
25 #ifndef CSR_WIFI_NME_ENABLE
26 #error CSR_WIFI_NME_ENABLE MUST be defined inorder to use csr_wifi_nme_ap_prim.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_prim.h
30 #endif
31 
32 #define CSR_WIFI_NME_AP_PRIM                                            (0x0426)
33 
34 typedef CsrPrim CsrWifiNmeApPrim;
35 
36 
37 /*******************************************************************************
38 
39   NAME
40     CsrWifiNmeApPersCredentialType
41 
42   DESCRIPTION
43     NME Credential Types
44 
45  VALUES
46     CSR_WIFI_NME_AP_CREDENTIAL_TYPE_PSK
47                    - Use PSK as credential.
48     CSR_WIFI_NME_AP_CREDENTIAL_TYPE_PASSPHRASE
49                    - Use the specified passphrase as credential
50 
51 *******************************************************************************/
52 typedef u8 CsrWifiNmeApPersCredentialType;
53 #define CSR_WIFI_NME_AP_CREDENTIAL_TYPE_PSK          ((CsrWifiNmeApPersCredentialType) 0x00)
54 #define CSR_WIFI_NME_AP_CREDENTIAL_TYPE_PASSPHRASE   ((CsrWifiNmeApPersCredentialType) 0x01)
55 
56 
57 /*******************************************************************************
58 
59   NAME
60     CsrWifiNmeApConfig
61 
62   DESCRIPTION
63     Structure holding AP config data.
64 
65   MEMBERS
66     apGroupkeyTimeout - Access point group key timeout.
67     apStrictGtkRekey  - Access point strict GTK rekey flag. If set TRUE, the AP
68                         shall rekey GTK every time a connected STA leaves BSS.
69     apGmkTimeout      - Access point GMK timeout
70     apResponseTimeout - Response timeout
71     apRetransLimit    - Max allowed retransmissions
72 
73 *******************************************************************************/
74 typedef struct
75 {
76     u16 apGroupkeyTimeout;
77     u8   apStrictGtkRekey;
78     u16 apGmkTimeout;
79     u16 apResponseTimeout;
80     u8  apRetransLimit;
81 } CsrWifiNmeApConfig;
82 
83 /*******************************************************************************
84 
85   NAME
86     CsrWifiNmeApAuthPers
87 
88   DESCRIPTION
89 
90   MEMBERS
91     authSupport                     - Credential type value (as defined in the
92                                       enumeration type).
93     rsnCapabilities                 - RSN capabilities mask
94     wapiCapabilities                - WAPI capabilities mask
95     pskOrPassphrase                 - Credential type value (as defined in the
96                                       enumeration type).
97     authPers_credentials            - Union containing credentials which depends
98                                       on credentialType parameter.
99     authPers_credentialspsk         -
100     authPers_credentialspassphrase  -
101 
102 *******************************************************************************/
103 typedef struct
104 {
105     CsrWifiSmeApAuthSupportMask      authSupport;
106     CsrWifiSmeApRsnCapabilitiesMask  rsnCapabilities;
107     CsrWifiSmeApWapiCapabilitiesMask wapiCapabilities;
108     CsrWifiNmeApPersCredentialType   pskOrPassphrase;
109     union {
110         CsrWifiNmePsk        psk;
111         CsrWifiNmePassphrase passphrase;
112     } authPers_credentials;
113 } CsrWifiNmeApAuthPers;
114 
115 /*******************************************************************************
116 
117   NAME
118     CsrWifiNmeApCredentials
119 
120   DESCRIPTION
121     Structure containing the Credentials data.
122 
123   MEMBERS
124     authType                     - Authentication type
125     nmeAuthType                  - Authentication parameters
126     nmeAuthTypeopenSystemEmpty   -
127     nmeAuthTypeauthwep           -
128     nmeAuthTypeauthTypePersonal  -
129 
130 *******************************************************************************/
131 typedef struct
132 {
133     CsrWifiSmeApAuthType authType;
134     union {
135         CsrWifiSmeEmpty      openSystemEmpty;
136         CsrWifiSmeWepAuth    authwep;
137         CsrWifiNmeApAuthPers authTypePersonal;
138     } nmeAuthType;
139 } CsrWifiNmeApCredentials;
140 
141 
142 /* Downstream */
143 #define CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_LOWEST            (0x0000)
144 
145 #define CSR_WIFI_NME_AP_CONFIG_SET_REQ                    ((CsrWifiNmeApPrim) (0x0000 + CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_LOWEST))
146 #define CSR_WIFI_NME_AP_WPS_REGISTER_REQ                  ((CsrWifiNmeApPrim) (0x0001 + CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_LOWEST))
147 #define CSR_WIFI_NME_AP_START_REQ                         ((CsrWifiNmeApPrim) (0x0002 + CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_LOWEST))
148 #define CSR_WIFI_NME_AP_STOP_REQ                          ((CsrWifiNmeApPrim) (0x0003 + CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_LOWEST))
149 #define CSR_WIFI_NME_AP_WMM_PARAM_UPDATE_REQ              ((CsrWifiNmeApPrim) (0x0004 + CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_LOWEST))
150 #define CSR_WIFI_NME_AP_STA_REMOVE_REQ                    ((CsrWifiNmeApPrim) (0x0005 + CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_LOWEST))
151 
152 
153 #define CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_HIGHEST           (0x0005 + CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_LOWEST)
154 
155 /* Upstream */
156 #define CSR_WIFI_NME_AP_PRIM_UPSTREAM_LOWEST              (0x0000 + CSR_PRIM_UPSTREAM)
157 
158 #define CSR_WIFI_NME_AP_CONFIG_SET_CFM                    ((CsrWifiNmeApPrim)(0x0000 + CSR_WIFI_NME_AP_PRIM_UPSTREAM_LOWEST))
159 #define CSR_WIFI_NME_AP_WPS_REGISTER_CFM                  ((CsrWifiNmeApPrim)(0x0001 + CSR_WIFI_NME_AP_PRIM_UPSTREAM_LOWEST))
160 #define CSR_WIFI_NME_AP_START_CFM                         ((CsrWifiNmeApPrim)(0x0002 + CSR_WIFI_NME_AP_PRIM_UPSTREAM_LOWEST))
161 #define CSR_WIFI_NME_AP_STOP_CFM                          ((CsrWifiNmeApPrim)(0x0003 + CSR_WIFI_NME_AP_PRIM_UPSTREAM_LOWEST))
162 #define CSR_WIFI_NME_AP_STOP_IND                          ((CsrWifiNmeApPrim)(0x0004 + CSR_WIFI_NME_AP_PRIM_UPSTREAM_LOWEST))
163 #define CSR_WIFI_NME_AP_WMM_PARAM_UPDATE_CFM              ((CsrWifiNmeApPrim)(0x0005 + CSR_WIFI_NME_AP_PRIM_UPSTREAM_LOWEST))
164 #define CSR_WIFI_NME_AP_STATION_IND                       ((CsrWifiNmeApPrim)(0x0006 + CSR_WIFI_NME_AP_PRIM_UPSTREAM_LOWEST))
165 
166 #define CSR_WIFI_NME_AP_PRIM_UPSTREAM_HIGHEST             (0x0006 + CSR_WIFI_NME_AP_PRIM_UPSTREAM_LOWEST)
167 
168 #define CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_COUNT             (CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_HIGHEST + 1 - CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_LOWEST)
169 #define CSR_WIFI_NME_AP_PRIM_UPSTREAM_COUNT               (CSR_WIFI_NME_AP_PRIM_UPSTREAM_HIGHEST   + 1 - CSR_WIFI_NME_AP_PRIM_UPSTREAM_LOWEST)
170 
171 /*******************************************************************************
172 
173   NAME
174     CsrWifiNmeApConfigSetReq
175 
176   DESCRIPTION
177     This primitive passes AP configuration info for NME. This can be sent at
178     any time but will be acted upon when the AP is started again. This
179     information is common to both P2P GO and AP
180 
181   MEMBERS
182     common      - Common header for use with the CsrWifiFsm Module
183     apConfig    - AP configuration for the NME.
184     apMacConfig - MAC configuration to be acted on when
185                   CSR_WIFI_NME_AP_START.request is sent.
186 
187 *******************************************************************************/
188 typedef struct
189 {
190     CsrWifiFsmEvent       common;
191     CsrWifiNmeApConfig    apConfig;
192     CsrWifiSmeApMacConfig apMacConfig;
193 } CsrWifiNmeApConfigSetReq;
194 
195 /*******************************************************************************
196 
197   NAME
198     CsrWifiNmeApWpsRegisterReq
199 
200   DESCRIPTION
201     This primitive allows the NME to accept the WPS registration from an
202     enrollee. Such registration procedure can be cancelled by sending
203     CSR_WIFI_NME_WPS_CANCEL.request.
204 
205   MEMBERS
206     common                   - Common header for use with the CsrWifiFsm Module
207     interfaceTag             - Interface Identifier; unique identifier of an
208                                interface
209     selectedDevicePasswordId - Selected password type
210     selectedConfigMethod     - Selected WPS configuration method type
211     pin                      - PIN value.
212                                Relevant if selected device password ID is PIN.4
213                                digit pin is passed by sending the pin digits in
214                                pin[0]..pin[3] and rest of the contents filled
215                                with '-'.
216 
217 *******************************************************************************/
218 typedef struct
219 {
220     CsrWifiFsmEvent         common;
221     u16               interfaceTag;
222     CsrWifiSmeWpsDpid       selectedDevicePasswordId;
223     CsrWifiSmeWpsConfigType selectedConfigMethod;
224     u8                pin[8];
225 } CsrWifiNmeApWpsRegisterReq;
226 
227 /*******************************************************************************
228 
229   NAME
230     CsrWifiNmeApStartReq
231 
232   DESCRIPTION
233     This primitive requests NME to started the AP operation.
234 
235   MEMBERS
236     common         - Common header for use with the CsrWifiFsm Module
237     interfaceTag   - Interface identifier; unique identifier of an interface
238     apType         - AP Type specifies the Legacy AP or P2P GO operation
239     cloakSsid      - Indicates whether the SSID should be cloaked (hidden and
240                      not broadcast in beacon) or not
241     ssid           - Service Set Identifier
242     ifIndex        - Radio interface
243     channel        - Channel number of the channel to use
244     apCredentials  - Security credential configuration.
245     maxConnections - Maximum number of stations/P2P clients allowed
246     p2pGoParam     - P2P specific GO parameters.
247     wpsEnabled     - Indicates whether WPS should be enabled or not
248 
249 *******************************************************************************/
250 typedef struct
251 {
252     CsrWifiFsmEvent         common;
253     u16               interfaceTag;
254     CsrWifiSmeApType        apType;
255     u8                 cloakSsid;
256     CsrWifiSsid             ssid;
257     CsrWifiSmeRadioIF       ifIndex;
258     u8                channel;
259     CsrWifiNmeApCredentials apCredentials;
260     u8                maxConnections;
261     CsrWifiSmeApP2pGoConfig p2pGoParam;
262     u8                 wpsEnabled;
263 } CsrWifiNmeApStartReq;
264 
265 /*******************************************************************************
266 
267   NAME
268     CsrWifiNmeApStopReq
269 
270   DESCRIPTION
271     This primitive requests NME to stop the AP operation.
272 
273   MEMBERS
274     common       - Common header for use with the CsrWifiFsm Module
275     interfaceTag - Interface identifier; unique identifier of an interface
276 
277 *******************************************************************************/
278 typedef struct
279 {
280     CsrWifiFsmEvent common;
281     u16       interfaceTag;
282 } CsrWifiNmeApStopReq;
283 
284 /*******************************************************************************
285 
286   NAME
287     CsrWifiNmeApWmmParamUpdateReq
288 
289   DESCRIPTION
290     Application uses this primitive to update the WMM parameters
291 
292   MEMBERS
293     common        - Common header for use with the CsrWifiFsm Module
294     wmmApParams   - WMM Access point parameters per access category. The array
295                     index corresponds to the ACI
296     wmmApBcParams - WMM station parameters per access category to be advertised
297                     in the beacons and probe response The array index
298                     corresponds to the ACI
299 
300 *******************************************************************************/
301 typedef struct
302 {
303     CsrWifiFsmEvent       common;
304     CsrWifiSmeWmmAcParams wmmApParams[4];
305     CsrWifiSmeWmmAcParams wmmApBcParams[4];
306 } CsrWifiNmeApWmmParamUpdateReq;
307 
308 /*******************************************************************************
309 
310   NAME
311     CsrWifiNmeApStaRemoveReq
312 
313   DESCRIPTION
314     This primitive disconnects a connected station. If keepBlocking is set to
315     TRUE, the station with the specified MAC address is not allowed to
316     connect. If the requested station is not already connected,it may be
317     blocked based on keepBlocking parameter.
318 
319   MEMBERS
320     common        - Common header for use with the CsrWifiFsm Module
321     interfaceTag  - Interface Identifier; unique identifier of an interface
322     staMacAddress - Mac Address of the station to be disconnected or blocked
323     keepBlocking  - If TRUE, the station is blocked. If FALSE and the station is
324                     connected, disconnect the station. If FALSE and the station
325                     is not connected, no action is taken.
326 
327 *******************************************************************************/
328 typedef struct
329 {
330     CsrWifiFsmEvent   common;
331     u16         interfaceTag;
332     CsrWifiMacAddress staMacAddress;
333     u8           keepBlocking;
334 } CsrWifiNmeApStaRemoveReq;
335 
336 /*******************************************************************************
337 
338   NAME
339     CsrWifiNmeApConfigSetCfm
340 
341   DESCRIPTION
342     This primitive reports the result of the request.
343 
344   MEMBERS
345     common - Common header for use with the CsrWifiFsm Module
346     status - Status of the request.
347 
348 *******************************************************************************/
349 typedef struct
350 {
351     CsrWifiFsmEvent common;
352     CsrResult       status;
353 } CsrWifiNmeApConfigSetCfm;
354 
355 /*******************************************************************************
356 
357   NAME
358     CsrWifiNmeApWpsRegisterCfm
359 
360   DESCRIPTION
361     This primitive reports the result of WPS procedure.
362 
363   MEMBERS
364     common       - Common header for use with the CsrWifiFsm Module
365     interfaceTag - Interface identifier; unique identifier of an interface
366     status       - Status of the request.
367 
368 *******************************************************************************/
369 typedef struct
370 {
371     CsrWifiFsmEvent common;
372     u16       interfaceTag;
373     CsrResult       status;
374 } CsrWifiNmeApWpsRegisterCfm;
375 
376 /*******************************************************************************
377 
378   NAME
379     CsrWifiNmeApStartCfm
380 
381   DESCRIPTION
382     This primitive reports the result of CSR_WIFI_NME_AP_START.request.
383 
384   MEMBERS
385     common       - Common header for use with the CsrWifiFsm Module
386     interfaceTag - Interface identifier; unique identifier of an interface
387     status       - Status of the request.
388     ssid         - Service Set Identifier
389 
390 *******************************************************************************/
391 typedef struct
392 {
393     CsrWifiFsmEvent common;
394     u16       interfaceTag;
395     CsrResult       status;
396     CsrWifiSsid     ssid;
397 } CsrWifiNmeApStartCfm;
398 
399 /*******************************************************************************
400 
401   NAME
402     CsrWifiNmeApStopCfm
403 
404   DESCRIPTION
405     This primitive confirms that the AP operation is stopped. NME shall send
406     this primitive in response to the request even if AP operation has
407     already been stopped
408 
409   MEMBERS
410     common       - Common header for use with the CsrWifiFsm Module
411     interfaceTag - Interface identifier; unique identifier of an interface
412     status       - Status of the request.
413 
414 *******************************************************************************/
415 typedef struct
416 {
417     CsrWifiFsmEvent common;
418     u16       interfaceTag;
419     CsrResult       status;
420 } CsrWifiNmeApStopCfm;
421 
422 /*******************************************************************************
423 
424   NAME
425     CsrWifiNmeApStopInd
426 
427   DESCRIPTION
428     Indicates that AP operation had stopped because of some unrecoverable
429     error after AP operation was started successfully. NME sends this signal
430     after failing to restart the AP operation internally following an error
431 
432   MEMBERS
433     common       - Common header for use with the CsrWifiFsm Module
434     interfaceTag - Interface Identifier; unique identifier of an interface
435     apType       - Reports AP Type (P2PGO or AP)
436     status       - Error Status
437 
438 *******************************************************************************/
439 typedef struct
440 {
441     CsrWifiFsmEvent  common;
442     u16        interfaceTag;
443     CsrWifiSmeApType apType;
444     CsrResult        status;
445 } CsrWifiNmeApStopInd;
446 
447 /*******************************************************************************
448 
449   NAME
450     CsrWifiNmeApWmmParamUpdateCfm
451 
452   DESCRIPTION
453     A confirm for for the WMM parameters update
454 
455   MEMBERS
456     common - Common header for use with the CsrWifiFsm Module
457     status - Status of the request.
458 
459 *******************************************************************************/
460 typedef struct
461 {
462     CsrWifiFsmEvent common;
463     CsrResult       status;
464 } CsrWifiNmeApWmmParamUpdateCfm;
465 
466 /*******************************************************************************
467 
468   NAME
469     CsrWifiNmeApStationInd
470 
471   DESCRIPTION
472     This primitive indicates that a station has joined or a previously joined
473     station has left the BSS/group
474 
475   MEMBERS
476     common            - Common header for use with the CsrWifiFsm Module
477     interfaceTag      - Interface Identifier; unique identifier of an interface
478     mediaStatus       - Indicates whether the station is connected or
479                         disconnected
480     peerMacAddress    - MAC address of the station
481     peerDeviceAddress - P2P Device Address
482 
483 *******************************************************************************/
484 typedef struct
485 {
486     CsrWifiFsmEvent       common;
487     u16             interfaceTag;
488     CsrWifiSmeMediaStatus mediaStatus;
489     CsrWifiMacAddress     peerMacAddress;
490     CsrWifiMacAddress     peerDeviceAddress;
491 } CsrWifiNmeApStationInd;
492 
493 #endif /* CSR_WIFI_NME_AP_PRIM_H__ */
494 
495