1 /* 2 * Driver interaction with extended Linux Wireless Extensions 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_WEXT_H 13 #define DRIVER_CMD_WEXT_H 14 15 #define WEXT_NUMBER_SCAN_CHANNELS_FCC 11 16 #define WEXT_NUMBER_SCAN_CHANNELS_ETSI 13 17 #define WEXT_NUMBER_SCAN_CHANNELS_MKK1 14 18 19 #define RSSI_CMD "RSSI" 20 #define LINKSPEED_CMD "LINKSPEED" 21 22 #define WPA_DRIVER_WEXT_WAIT_US 400000 23 #define MAX_DRV_CMD_SIZE 248 24 #define WEXT_NUMBER_SEQUENTIAL_ERRORS 4 25 #define WEXT_CSCAN_AMOUNT 9 26 #define WEXT_CSCAN_BUF_LEN 360 27 #define WEXT_CSCAN_HEADER "CSCAN S\x01\x00\x00S\x00" 28 #define WEXT_CSCAN_HEADER_SIZE 12 29 #define WEXT_CSCAN_SSID_SECTION 'S' 30 #define WEXT_CSCAN_CHANNEL_SECTION 'C' 31 #define WEXT_CSCAN_NPROBE_SECTION 'N' 32 #define WEXT_CSCAN_ACTV_DWELL_SECTION 'A' 33 #define WEXT_CSCAN_PASV_DWELL_SECTION 'P' 34 #define WEXT_CSCAN_HOME_DWELL_SECTION 'H' 35 #define WEXT_CSCAN_TYPE_SECTION 'T' 36 #define WEXT_CSCAN_TYPE_DEFAULT 0 37 #define WEXT_CSCAN_TYPE_PASSIVE 1 38 #define WEXT_CSCAN_PASV_DWELL_TIME 130 39 #define WEXT_CSCAN_PASV_DWELL_TIME_DEF 250 40 #define WEXT_CSCAN_PASV_DWELL_TIME_MAX 3000 41 #define WEXT_CSCAN_HOME_DWELL_TIME 130 42 43 #define WEXT_PNOSETUP_HEADER "PNOSETUP " 44 #define WEXT_PNOSETUP_HEADER_SIZE 9 45 #define WEXT_PNO_TLV_PREFIX 'S' 46 #define WEXT_PNO_TLV_VERSION '1' 47 #define WEXT_PNO_TLV_SUBVERSION '2' 48 #define WEXT_PNO_TLV_RESERVED '0' 49 #define WEXT_PNO_VERSION_SIZE 4 50 #define WEXT_PNO_AMOUNT 16 51 #define WEXT_PNO_SSID_SECTION 'S' 52 /* SSID header size is SSID section type above + SSID length */ 53 #define WEXT_PNO_SSID_HEADER_SIZE 2 54 #define WEXT_PNO_SCAN_INTERVAL_SECTION 'T' 55 #define WEXT_PNO_SCAN_INTERVAL_LENGTH 2 56 #define WEXT_PNO_SCAN_INTERVAL 30 57 /* Scan interval size is scan interval section type + scan interval length above*/ 58 #define WEXT_PNO_SCAN_INTERVAL_SIZE (1 + WEXT_PNO_SCAN_INTERVAL_LENGTH) 59 #define WEXT_PNO_REPEAT_SECTION 'R' 60 #define WEXT_PNO_REPEAT_LENGTH 1 61 #define WEXT_PNO_REPEAT 4 62 /* Repeat section size is Repeat section type + Repeat value length above*/ 63 #define WEXT_PNO_REPEAT_SIZE (1 + WEXT_PNO_REPEAT_LENGTH) 64 #define WEXT_PNO_MAX_REPEAT_SECTION 'M' 65 #define WEXT_PNO_MAX_REPEAT_LENGTH 1 66 #define WEXT_PNO_MAX_REPEAT 3 67 /* Max Repeat section size is Max Repeat section type + Max Repeat value length above*/ 68 #define WEXT_PNO_MAX_REPEAT_SIZE (1 + WEXT_PNO_MAX_REPEAT_LENGTH) 69 /* This corresponds to the size of all sections expect SSIDs */ 70 #define WEXT_PNO_NONSSID_SECTIONS_SIZE (WEXT_PNO_SCAN_INTERVAL_SIZE + WEXT_PNO_REPEAT_SIZE + WEXT_PNO_MAX_REPEAT_SIZE) 71 /* PNO Max command size is total of header, version, ssid and other sections + Null termination */ 72 #define WEXT_PNO_MAX_COMMAND_SIZE (WEXT_PNOSETUP_HEADER_SIZE + WEXT_PNO_VERSION_SIZE \ 73 + WEXT_PNO_AMOUNT * (WEXT_PNO_SSID_HEADER_SIZE + IW_ESSID_MAX_SIZE) \ 74 + WEXT_PNO_NONSSID_SECTIONS_SIZE + 1) 75 76 #endif /* DRIVER_CMD_WEXT_H */ 77