OSDN Git Service

add private_lib for NL80211 driver.
[android-x86/external-wpa_supplicant_8.git] / private_lib / driver_cmd_common.h
1 /*
2  * Driver interaction for private interface
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * Alternatively, this software may be distributed under the terms of BSD
9  * license.
10  *
11  */
12 #ifndef DRIVER_CMD_COMMON_H
13 #define DRIVER_CMD_COMMON_H
14
15 #include "config_ssid.h"
16
17 #define MAX_DRV_CMD_SIZE                248
18 #define DRV_NUMBER_SEQUENTIAL_ERRORS    4
19
20 #define RSSI_CMD                        "RSSI"
21 #define LINKSPEED_CMD                   "LINKSPEED"
22
23 #define MAX_WPSP2PIE_CMD_SIZE           384
24
25 #define WEXT_PNOSETUP_HEADER            "PNOSETUP "
26 #define WEXT_PNOSETUP_HEADER_SIZE       9
27 #define WEXT_PNO_TLV_PREFIX             'S'
28 #define WEXT_PNO_TLV_VERSION            '1'
29 #define WEXT_PNO_TLV_SUBVERSION         '2'
30 #define WEXT_PNO_TLV_RESERVED           '0'
31 #define WEXT_PNO_VERSION_SIZE           4
32 #define WEXT_PNO_AMOUNT                 16
33 #define WEXT_PNO_SSID_SECTION           'S'
34 /* SSID header size is SSID section type above + SSID length */
35 #define WEXT_PNO_SSID_HEADER_SIZE       2
36 #define WEXT_PNO_SCAN_INTERVAL_SECTION  'T'
37 #define WEXT_PNO_SCAN_INTERVAL_LENGTH   2
38 #define WEXT_PNO_SCAN_INTERVAL          30
39 /* Scan interval size is scan interval section type + scan interval length above*/
40 #define WEXT_PNO_SCAN_INTERVAL_SIZE     (1 + WEXT_PNO_SCAN_INTERVAL_LENGTH)
41 #define WEXT_PNO_REPEAT_SECTION         'R'
42 #define WEXT_PNO_REPEAT_LENGTH          1
43 #define WEXT_PNO_REPEAT                 4
44 /* Repeat section size is Repeat section type + Repeat value length above*/
45 #define WEXT_PNO_REPEAT_SIZE            (1 + WEXT_PNO_REPEAT_LENGTH)
46 #define WEXT_PNO_MAX_REPEAT_SECTION     'M'
47 #define WEXT_PNO_MAX_REPEAT_LENGTH      1
48 #define WEXT_PNO_MAX_REPEAT             3
49 /* Max Repeat section size is Max Repeat section type + Max Repeat value length above*/
50 #define WEXT_PNO_MAX_REPEAT_SIZE        (1 + WEXT_PNO_MAX_REPEAT_LENGTH)
51 /* This corresponds to the size of all sections expect SSIDs */
52 #define WEXT_PNO_NONSSID_SECTIONS_SIZE  (WEXT_PNO_SCAN_INTERVAL_SIZE + WEXT_PNO_REPEAT_SIZE + WEXT_PNO_MAX_REPEAT_SIZE)
53 /* PNO Max command size is total of header, version, ssid and other sections + Null termination */
54 #define WEXT_PNO_MAX_COMMAND_SIZE       (WEXT_PNOSETUP_HEADER_SIZE + WEXT_PNO_VERSION_SIZE \
55                                         + WEXT_PNO_AMOUNT * (WEXT_PNO_SSID_HEADER_SIZE + MAX_SSID_LEN) \
56                                         + WEXT_PNO_NONSSID_SECTIONS_SIZE + 1)
57
58 #endif /* DRIVER_CMD_COMMON_H */