aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/csr/csr_wifi_nme_ap_prim.h
blob: b32bdbc7e22f2ed2fb7a10d3c81106ce76714989 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
/*****************************************************************************

            (c) Cambridge Silicon Radio Limited 2012
            All rights reserved and confidential information of CSR

            Refer to LICENSE.txt included with this source for details
            on the license terms.

*****************************************************************************/

/* Note: this is an auto-generated file. */

#ifndef CSR_WIFI_NME_AP_PRIM_H__
#define CSR_WIFI_NME_AP_PRIM_H__

#include <linux/types.h>
#include "csr_prim_defs.h"
#include "csr_sched.h"
#include "csr_wifi_common.h"
#include "csr_result.h"
#include "csr_wifi_fsm_event.h"
#include "csr_wifi_sme_ap_prim.h"
#include "csr_wifi_nme_prim.h"

#ifndef CSR_WIFI_NME_ENABLE
#error CSR_WIFI_NME_ENABLE MUST be defined inorder to use csr_wifi_nme_ap_prim.h
#endif
#ifndef CSR_WIFI_AP_ENABLE
#error CSR_WIFI_AP_ENABLE MUST be defined inorder to use csr_wifi_nme_ap_prim.h
#endif

#define CSR_WIFI_NME_AP_PRIM                                            (0x0426)

typedef CsrPrim CsrWifiNmeApPrim;


/*******************************************************************************

  NAME
    CsrWifiNmeApPersCredentialType

  DESCRIPTION
    NME Credential Types

 VALUES
    CSR_WIFI_NME_AP_CREDENTIAL_TYPE_PSK
                   - Use PSK as credential.
    CSR_WIFI_NME_AP_CREDENTIAL_TYPE_PASSPHRASE
                   - Use the specified passphrase as credential

*******************************************************************************/
typedef u8 CsrWifiNmeApPersCredentialType;
#define CSR_WIFI_NME_AP_CREDENTIAL_TYPE_PSK          ((CsrWifiNmeApPersCredentialType) 0x00)
#define CSR_WIFI_NME_AP_CREDENTIAL_TYPE_PASSPHRASE   ((CsrWifiNmeApPersCredentialType) 0x01)


/*******************************************************************************

  NAME
    CsrWifiNmeApConfig

  DESCRIPTION
    Structure holding AP config data.

  MEMBERS
    apGroupkeyTimeout - Access point group key timeout.
    apStrictGtkRekey  - Access point strict GTK rekey flag. If set TRUE, the AP
                        shall rekey GTK every time a connected STA leaves BSS.
    apGmkTimeout      - Access point GMK timeout
    apResponseTimeout - Response timeout
    apRetransLimit    - Max allowed retransmissions

*******************************************************************************/
typedef struct
{
    u16 apGroupkeyTimeout;
    u8   apStrictGtkRekey;
    u16 apGmkTimeout;
    u16 apResponseTimeout;
    u8  apRetransLimit;
} CsrWifiNmeApConfig;

/*******************************************************************************

  NAME
    CsrWifiNmeApAuthPers

  DESCRIPTION

  MEMBERS
    authSupport                     - Credential type value (as defined in the
                                      enumeration type).
    rsnCapabilities                 - RSN capabilities mask
    wapiCapabilities                - WAPI capabilities mask
    pskOrPassphrase                 - Credential type value (as defined in the
                                      enumeration type).
    authPers_credentials            - Union containing credentials which depends
                                      on credentialType parameter.
    authPers_credentialspsk         -
    authPers_credentialspassphrase  -

*******************************************************************************/
typedef struct
{
    CsrWifiSmeApAuthSupportMask      authSupport;
    CsrWifiSmeApRsnCapabilitiesMask  rsnCapabilities;
    CsrWifiSmeApWapiCapabilitiesMask wapiCapabilities;
    CsrWifiNmeApPersCredentialType   pskOrPassphrase;
    union {
        CsrWifiNmePsk        psk;
        CsrWifiNmePassphrase passphrase;
    } authPers_credentials;
} CsrWifiNmeApAuthPers;

/*******************************************************************************

  NAME
    CsrWifiNmeApCredentials

  DESCRIPTION
    Structure containing the Credentials data.

  MEMBERS
    authType                     - Authentication type
    nmeAuthType                  - Authentication parameters
    nmeAuthTypeopenSystemEmpty   -
    nmeAuthTypeauthwep           -
    nmeAuthTypeauthTypePersonal  -

*******************************************************************************/
typedef struct
{
    CsrWifiSmeApAuthType authType;
    union {
        CsrWifiSmeEmpty      openSystemEmpty;
        CsrWifiSmeWepAuth    authwep;
        CsrWifiNmeApAuthPers authTypePersonal;
    } nmeAuthType;
} CsrWifiNmeApCredentials;


/* Downstream */
#define CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_LOWEST            (0x0000)

#define CSR_WIFI_NME_AP_CONFIG_SET_REQ                    ((CsrWifiNmeApPrim) (0x0000 + CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_LOWEST))
#define CSR_WIFI_NME_AP_WPS_REGISTER_REQ                  ((CsrWifiNmeApPrim) (0x0001 + CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_LOWEST))
#define CSR_WIFI_NME_AP_START_REQ                         ((CsrWifiNmeApPrim) (0x0002 + CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_LOWEST))
#define CSR_WIFI_NME_AP_STOP_REQ                          ((CsrWifiNmeApPrim) (0x0003 + CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_LOWEST))
#define CSR_WIFI_NME_AP_WMM_PARAM_UPDATE_REQ              ((CsrWifiNmeApPrim) (0x0004 + CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_LOWEST))
#define CSR_WIFI_NME_AP_STA_REMOVE_REQ                    ((CsrWifiNmeApPrim) (0x0005 + CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_LOWEST))


#define CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_HIGHEST           (0x0005 + CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_LOWEST)

/* Upstream */
#define CSR_WIFI_NME_AP_PRIM_UPSTREAM_LOWEST              (0x0000 + CSR_PRIM_UPSTREAM)

#define CSR_WIFI_NME_AP_CONFIG_SET_CFM                    ((CsrWifiNmeApPrim)(0x0000 + CSR_WIFI_NME_AP_PRIM_UPSTREAM_LOWEST))
#define CSR_WIFI_NME_AP_WPS_REGISTER_CFM                  ((CsrWifiNmeApPrim)(0x0001 + CSR_WIFI_NME_AP_PRIM_UPSTREAM_LOWEST))
#define CSR_WIFI_NME_AP_START_CFM                         ((CsrWifiNmeApPrim)(0x0002 + CSR_WIFI_NME_AP_PRIM_UPSTREAM_LOWEST))
#define CSR_WIFI_NME_AP_STOP_CFM                          ((CsrWifiNmeApPrim)(0x0003 + CSR_WIFI_NME_AP_PRIM_UPSTREAM_LOWEST))
#define CSR_WIFI_NME_AP_STOP_IND                          ((CsrWifiNmeApPrim)(0x0004 + CSR_WIFI_NME_AP_PRIM_UPSTREAM_LOWEST))
#define CSR_WIFI_NME_AP_WMM_PARAM_UPDATE_CFM              ((CsrWifiNmeApPrim)(0x0005 + CSR_WIFI_NME_AP_PRIM_UPSTREAM_LOWEST))
#define CSR_WIFI_NME_AP_STATION_IND                       ((CsrWifiNmeApPrim)(0x0006 + CSR_WIFI_NME_AP_PRIM_UPSTREAM_LOWEST))

#define CSR_WIFI_NME_AP_PRIM_UPSTREAM_HIGHEST             (0x0006 + CSR_WIFI_NME_AP_PRIM_UPSTREAM_LOWEST)

#define CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_COUNT             (CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_HIGHEST + 1 - CSR_WIFI_NME_AP_PRIM_DOWNSTREAM_LOWEST)
#define CSR_WIFI_NME_AP_PRIM_UPSTREAM_COUNT               (CSR_WIFI_NME_AP_PRIM_UPSTREAM_HIGHEST   + 1 - CSR_WIFI_NME_AP_PRIM_UPSTREAM_LOWEST)

/*******************************************************************************

  NAME
    CsrWifiNmeApConfigSetReq

  DESCRIPTION
    This primitive passes AP configuration info for NME. This can be sent at
    any time but will be acted upon when the AP is started again. This
    information is common to both P2P GO and AP

  MEMBERS
    common      - Common header for use with the CsrWifiFsm Module
    apConfig    - AP configuration for the NME.
    apMacConfig - MAC configuration to be acted on when
                  CSR_WIFI_NME_AP_START.request is sent.

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent       common;
    CsrWifiNmeApConfig    apConfig;
    CsrWifiSmeApMacConfig apMacConfig;
} CsrWifiNmeApConfigSetReq;

/*******************************************************************************

  NAME
    CsrWifiNmeApWpsRegisterReq

  DESCRIPTION
    This primitive allows the NME to accept the WPS registration from an
    enrollee. Such registration procedure can be cancelled by sending
    CSR_WIFI_NME_WPS_CANCEL.request.

  MEMBERS
    common                   - Common header for use with the CsrWifiFsm Module
    interfaceTag             - Interface Identifier; unique identifier of an
                               interface
    selectedDevicePasswordId - Selected password type
    selectedConfigMethod     - Selected WPS configuration method type
    pin                      - PIN value.
                               Relevant if selected device password ID is PIN.4
                               digit pin is passed by sending the pin digits in
                               pin[0]..pin[3] and rest of the contents filled
                               with '-'.

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent         common;
    u16               interfaceTag;
    CsrWifiSmeWpsDpid       selectedDevicePasswordId;
    CsrWifiSmeWpsConfigType selectedConfigMethod;
    u8                pin[8];
} CsrWifiNmeApWpsRegisterReq;

/*******************************************************************************

  NAME
    CsrWifiNmeApStartReq

  DESCRIPTION
    This primitive requests NME to started the AP operation.

  MEMBERS
    common         - Common header for use with the CsrWifiFsm Module
    interfaceTag   - Interface identifier; unique identifier of an interface
    apType         - AP Type specifies the Legacy AP or P2P GO operation
    cloakSsid      - Indicates whether the SSID should be cloaked (hidden and
                     not broadcast in beacon) or not
    ssid           - Service Set Identifier
    ifIndex        - Radio interface
    channel        - Channel number of the channel to use
    apCredentials  - Security credential configuration.
    maxConnections - Maximum number of stations/P2P clients allowed
    p2pGoParam     - P2P specific GO parameters.
    wpsEnabled     - Indicates whether WPS should be enabled or not

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent         common;
    u16               interfaceTag;
    CsrWifiSmeApType        apType;
    u8                 cloakSsid;
    CsrWifiSsid             ssid;
    CsrWifiSmeRadioIF       ifIndex;
    u8                channel;
    CsrWifiNmeApCredentials apCredentials;
    u8                maxConnections;
    CsrWifiSmeApP2pGoConfig p2pGoParam;
    u8                 wpsEnabled;
} CsrWifiNmeApStartReq;

/*******************************************************************************

  NAME
    CsrWifiNmeApStopReq

  DESCRIPTION
    This primitive requests NME to stop the AP operation.

  MEMBERS
    common       - Common header for use with the CsrWifiFsm Module
    interfaceTag - Interface identifier; unique identifier of an interface

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent common;
    u16       interfaceTag;
} CsrWifiNmeApStopReq;

/*******************************************************************************

  NAME
    CsrWifiNmeApWmmParamUpdateReq

  DESCRIPTION
    Application uses this primitive to update the WMM parameters

  MEMBERS
    common        - Common header for use with the CsrWifiFsm Module
    wmmApParams   - WMM Access point parameters per access category. The array
                    index corresponds to the ACI
    wmmApBcParams - WMM station parameters per access category to be advertised
                    in the beacons and probe response The array index
                    corresponds to the ACI

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent       common;
    CsrWifiSmeWmmAcParams wmmApParams[4];
    CsrWifiSmeWmmAcParams wmmApBcParams[4];
} CsrWifiNmeApWmmParamUpdateReq;

/*******************************************************************************

  NAME
    CsrWifiNmeApStaRemoveReq

  DESCRIPTION
    This primitive disconnects a connected station. If keepBlocking is set to
    TRUE, the station with the specified MAC address is not allowed to
    connect. If the requested station is not already connected,it may be
    blocked based on keepBlocking parameter.

  MEMBERS
    common        - Common header for use with the CsrWifiFsm Module
    interfaceTag  - Interface Identifier; unique identifier of an interface
    staMacAddress - Mac Address of the station to be disconnected or blocked
    keepBlocking  - If TRUE, the station is blocked. If FALSE and the station is
                    connected, disconnect the station. If FALSE and the station
                    is not connected, no action is taken.

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent   common;
    u16         interfaceTag;
    CsrWifiMacAddress staMacAddress;
    u8           keepBlocking;
} CsrWifiNmeApStaRemoveReq;

/*******************************************************************************

  NAME
    CsrWifiNmeApConfigSetCfm

  DESCRIPTION
    This primitive reports the result of the request.

  MEMBERS
    common - Common header for use with the CsrWifiFsm Module
    status - Status of the request.

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent common;
    CsrResult       status;
} CsrWifiNmeApConfigSetCfm;

/*******************************************************************************

  NAME
    CsrWifiNmeApWpsRegisterCfm

  DESCRIPTION
    This primitive reports the result of WPS procedure.

  MEMBERS
    common       - Common header for use with the CsrWifiFsm Module
    interfaceTag - Interface identifier; unique identifier of an interface
    status       - Status of the request.

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent common;
    u16       interfaceTag;
    CsrResult       status;
} CsrWifiNmeApWpsRegisterCfm;

/*******************************************************************************

  NAME
    CsrWifiNmeApStartCfm

  DESCRIPTION
    This primitive reports the result of CSR_WIFI_NME_AP_START.request.

  MEMBERS
    common       - Common header for use with the CsrWifiFsm Module
    interfaceTag - Interface identifier; unique identifier of an interface
    status       - Status of the request.
    ssid         - Service Set Identifier

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent common;
    u16       interfaceTag;
    CsrResult       status;
    CsrWifiSsid     ssid;
} CsrWifiNmeApStartCfm;

/*******************************************************************************

  NAME
    CsrWifiNmeApStopCfm

  DESCRIPTION
    This primitive confirms that the AP operation is stopped. NME shall send
    this primitive in response to the request even if AP operation has
    already been stopped

  MEMBERS
    common       - Common header for use with the CsrWifiFsm Module
    interfaceTag - Interface identifier; unique identifier of an interface
    status       - Status of the request.

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent common;
    u16       interfaceTag;
    CsrResult       status;
} CsrWifiNmeApStopCfm;

/*******************************************************************************

  NAME
    CsrWifiNmeApStopInd

  DESCRIPTION
    Indicates that AP operation had stopped because of some unrecoverable
    error after AP operation was started successfully. NME sends this signal
    after failing to restart the AP operation internally following an error

  MEMBERS
    common       - Common header for use with the CsrWifiFsm Module
    interfaceTag - Interface Identifier; unique identifier of an interface
    apType       - Reports AP Type (P2PGO or AP)
    status       - Error Status

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent  common;
    u16        interfaceTag;
    CsrWifiSmeApType apType;
    CsrResult        status;
} CsrWifiNmeApStopInd;

/*******************************************************************************

  NAME
    CsrWifiNmeApWmmParamUpdateCfm

  DESCRIPTION
    A confirm for for the WMM parameters update

  MEMBERS
    common - Common header for use with the CsrWifiFsm Module
    status - Status of the request.

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent common;
    CsrResult       status;
} CsrWifiNmeApWmmParamUpdateCfm;

/*******************************************************************************

  NAME
    CsrWifiNmeApStationInd

  DESCRIPTION
    This primitive indicates that a station has joined or a previously joined
    station has left the BSS/group

  MEMBERS
    common            - Common header for use with the CsrWifiFsm Module
    interfaceTag      - Interface Identifier; unique identifier of an interface
    mediaStatus       - Indicates whether the station is connected or
                        disconnected
    peerMacAddress    - MAC address of the station
    peerDeviceAddress - P2P Device Address

*******************************************************************************/
typedef struct
{
    CsrWifiFsmEvent       common;
    u16             interfaceTag;
    CsrWifiSmeMediaStatus mediaStatus;
    CsrWifiMacAddress     peerMacAddress;
    CsrWifiMacAddress     peerDeviceAddress;
} CsrWifiNmeApStationInd;

#endif /* CSR_WIFI_NME_AP_PRIM_H__ */