11f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt/* 21f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * Android driver interface 31f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 41f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * This program is free software; you can redistribute it and/or modify 51f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * it under the terms of the GNU General Public License version 2 as 61f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * published by the Free Software Foundation. 71f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * 81f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * Alternatively, this software may be distributed under the terms of BSD 91f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * license. 101f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 111f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 121f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#ifndef ANDROID_DRV_H 131f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define ANDROID_DRV_H 141f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 151f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WPA_EVENT_DRIVER_STATE "CTRL-EVENT-DRIVER-STATE " 161f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 171f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define MAX_SSID_LEN 32 181f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 191f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define MAX_DRV_CMD_SIZE 248 201f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define DRV_NUMBER_SEQUENTIAL_ERRORS 4 211f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 221f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WEXT_PNOSETUP_HEADER "PNOSETUP " 231f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WEXT_PNOSETUP_HEADER_SIZE 9 241f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WEXT_PNO_TLV_PREFIX 'S' 251f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WEXT_PNO_TLV_VERSION '1' 261f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WEXT_PNO_TLV_SUBVERSION '2' 271f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WEXT_PNO_TLV_RESERVED '0' 281f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WEXT_PNO_VERSION_SIZE 4 291f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WEXT_PNO_AMOUNT 16 301f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WEXT_PNO_SSID_SECTION 'S' 311f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt/* SSID header size is SSID section type above + SSID length */ 321f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WEXT_PNO_SSID_HEADER_SIZE 2 331f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WEXT_PNO_SCAN_INTERVAL_SECTION 'T' 341f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WEXT_PNO_SCAN_INTERVAL_LENGTH 2 351f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WEXT_PNO_SCAN_INTERVAL 30 361f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt/* Scan interval size is scan interval section type + scan interval length 371f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * above */ 381f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WEXT_PNO_SCAN_INTERVAL_SIZE (1 + WEXT_PNO_SCAN_INTERVAL_LENGTH) 391f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WEXT_PNO_REPEAT_SECTION 'R' 401f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WEXT_PNO_REPEAT_LENGTH 1 411f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WEXT_PNO_REPEAT 4 421f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt/* Repeat section size is Repeat section type + Repeat value length above */ 431f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WEXT_PNO_REPEAT_SIZE (1 + WEXT_PNO_REPEAT_LENGTH) 441f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WEXT_PNO_MAX_REPEAT_SECTION 'M' 451f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WEXT_PNO_MAX_REPEAT_LENGTH 1 461f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WEXT_PNO_MAX_REPEAT 3 471f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt/* Max Repeat section size is Max Repeat section type + Max Repeat value length 481f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * above */ 491f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WEXT_PNO_MAX_REPEAT_SIZE (1 + WEXT_PNO_MAX_REPEAT_LENGTH) 501f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt/* This corresponds to the size of all sections expect SSIDs */ 511f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WEXT_PNO_NONSSID_SECTIONS_SIZE \ 521f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt(WEXT_PNO_SCAN_INTERVAL_SIZE + WEXT_PNO_REPEAT_SIZE + WEXT_PNO_MAX_REPEAT_SIZE) 531f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt/* PNO Max command size is total of header, version, ssid and other sections + 541f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * Null termination */ 551f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define WEXT_PNO_MAX_COMMAND_SIZE \ 561f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt (WEXT_PNOSETUP_HEADER_SIZE + WEXT_PNO_VERSION_SIZE \ 571f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt + WEXT_PNO_AMOUNT * (WEXT_PNO_SSID_HEADER_SIZE + MAX_SSID_LEN) \ 581f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt + WEXT_PNO_NONSSID_SECTIONS_SIZE + 1) 591f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 601f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#endif /* ANDROID_DRV_H */ 61