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