1*3ff40c12SJohn Marino /* 2*3ff40c12SJohn Marino * Android driver interface 3*3ff40c12SJohn Marino * 4*3ff40c12SJohn Marino * This software may be distributed under the terms of the BSD license. 5*3ff40c12SJohn Marino * See README for more details. 6*3ff40c12SJohn Marino */ 7*3ff40c12SJohn Marino 8*3ff40c12SJohn Marino #ifndef ANDROID_DRV_H 9*3ff40c12SJohn Marino #define ANDROID_DRV_H 10*3ff40c12SJohn Marino 11*3ff40c12SJohn Marino #define WPA_EVENT_DRIVER_STATE "CTRL-EVENT-DRIVER-STATE " 12*3ff40c12SJohn Marino 13*3ff40c12SJohn Marino #define MAX_SSID_LEN 32 14*3ff40c12SJohn Marino 15*3ff40c12SJohn Marino #define MAX_DRV_CMD_SIZE 248 16*3ff40c12SJohn Marino #define DRV_NUMBER_SEQUENTIAL_ERRORS 4 17*3ff40c12SJohn Marino 18*3ff40c12SJohn Marino #define WEXT_PNOSETUP_HEADER "PNOSETUP " 19*3ff40c12SJohn Marino #define WEXT_PNOSETUP_HEADER_SIZE 9 20*3ff40c12SJohn Marino #define WEXT_PNO_TLV_PREFIX 'S' 21*3ff40c12SJohn Marino #define WEXT_PNO_TLV_VERSION '1' 22*3ff40c12SJohn Marino #define WEXT_PNO_TLV_SUBVERSION '2' 23*3ff40c12SJohn Marino #define WEXT_PNO_TLV_RESERVED '0' 24*3ff40c12SJohn Marino #define WEXT_PNO_VERSION_SIZE 4 25*3ff40c12SJohn Marino #define WEXT_PNO_AMOUNT 16 26*3ff40c12SJohn Marino #define WEXT_PNO_SSID_SECTION 'S' 27*3ff40c12SJohn Marino /* SSID header size is SSID section type above + SSID length */ 28*3ff40c12SJohn Marino #define WEXT_PNO_SSID_HEADER_SIZE 2 29*3ff40c12SJohn Marino #define WEXT_PNO_SCAN_INTERVAL_SECTION 'T' 30*3ff40c12SJohn Marino #define WEXT_PNO_SCAN_INTERVAL_LENGTH 2 31*3ff40c12SJohn Marino #define WEXT_PNO_SCAN_INTERVAL 30 32*3ff40c12SJohn Marino /* Scan interval size is scan interval section type + scan interval length 33*3ff40c12SJohn Marino * above */ 34*3ff40c12SJohn Marino #define WEXT_PNO_SCAN_INTERVAL_SIZE (1 + WEXT_PNO_SCAN_INTERVAL_LENGTH) 35*3ff40c12SJohn Marino #define WEXT_PNO_REPEAT_SECTION 'R' 36*3ff40c12SJohn Marino #define WEXT_PNO_REPEAT_LENGTH 1 37*3ff40c12SJohn Marino #define WEXT_PNO_REPEAT 4 38*3ff40c12SJohn Marino /* Repeat section size is Repeat section type + Repeat value length above */ 39*3ff40c12SJohn Marino #define WEXT_PNO_REPEAT_SIZE (1 + WEXT_PNO_REPEAT_LENGTH) 40*3ff40c12SJohn Marino #define WEXT_PNO_MAX_REPEAT_SECTION 'M' 41*3ff40c12SJohn Marino #define WEXT_PNO_MAX_REPEAT_LENGTH 1 42*3ff40c12SJohn Marino #define WEXT_PNO_MAX_REPEAT 3 43*3ff40c12SJohn Marino /* Max Repeat section size is Max Repeat section type + Max Repeat value length 44*3ff40c12SJohn Marino * above */ 45*3ff40c12SJohn Marino #define WEXT_PNO_MAX_REPEAT_SIZE (1 + WEXT_PNO_MAX_REPEAT_LENGTH) 46*3ff40c12SJohn Marino /* This corresponds to the size of all sections expect SSIDs */ 47*3ff40c12SJohn Marino #define WEXT_PNO_NONSSID_SECTIONS_SIZE \ 48*3ff40c12SJohn Marino (WEXT_PNO_SCAN_INTERVAL_SIZE + WEXT_PNO_REPEAT_SIZE + WEXT_PNO_MAX_REPEAT_SIZE) 49*3ff40c12SJohn Marino /* PNO Max command size is total of header, version, ssid and other sections + 50*3ff40c12SJohn Marino * Null termination */ 51*3ff40c12SJohn Marino #define WEXT_PNO_MAX_COMMAND_SIZE \ 52*3ff40c12SJohn Marino (WEXT_PNOSETUP_HEADER_SIZE + WEXT_PNO_VERSION_SIZE \ 53*3ff40c12SJohn Marino + WEXT_PNO_AMOUNT * (WEXT_PNO_SSID_HEADER_SIZE + MAX_SSID_LEN) \ 54*3ff40c12SJohn Marino + WEXT_PNO_NONSSID_SECTIONS_SIZE + 1) 55*3ff40c12SJohn Marino 56*3ff40c12SJohn Marino #endif /* ANDROID_DRV_H */ 57