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