Home | History | Annotate | Download | only in drivers
      1 /*
      2  * Android driver interface
      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 ANDROID_DRV_H
     13 #define ANDROID_DRV_H
     14 
     15 #define WPA_EVENT_DRIVER_STATE "CTRL-EVENT-DRIVER-STATE "
     16 
     17 #define WEXT_CSCAN_AMOUNT		9
     18 
     19 #define MAX_SSID_LEN 32
     20 
     21 #define MAX_DRV_CMD_SIZE		248
     22 #define DRV_NUMBER_SEQUENTIAL_ERRORS	4
     23 
     24 #define WEXT_PNOSETUP_HEADER		"PNOSETUP "
     25 #define WEXT_PNOSETUP_HEADER_SIZE	9
     26 #define WEXT_PNO_TLV_PREFIX		'S'
     27 #define WEXT_PNO_TLV_VERSION		'1'
     28 #define WEXT_PNO_TLV_SUBVERSION		'2'
     29 #define WEXT_PNO_TLV_RESERVED		'0'
     30 #define WEXT_PNO_VERSION_SIZE		4
     31 #define WEXT_PNO_AMOUNT			16
     32 #define WEXT_PNO_SSID_SECTION		'S'
     33 /* SSID header size is SSID section type above + SSID length */
     34 #define WEXT_PNO_SSID_HEADER_SIZE	2
     35 #define WEXT_PNO_SCAN_INTERVAL_SECTION	'T'
     36 #define WEXT_PNO_SCAN_INTERVAL_LENGTH	2
     37 #define WEXT_PNO_SCAN_INTERVAL		30
     38 /* Scan interval size is scan interval section type + scan interval length
     39  * above */
     40 #define WEXT_PNO_SCAN_INTERVAL_SIZE	(1 + WEXT_PNO_SCAN_INTERVAL_LENGTH)
     41 #define WEXT_PNO_REPEAT_SECTION		'R'
     42 #define WEXT_PNO_REPEAT_LENGTH		1
     43 #define WEXT_PNO_REPEAT			4
     44 /* Repeat section size is Repeat section type + Repeat value length above */
     45 #define WEXT_PNO_REPEAT_SIZE		(1 + WEXT_PNO_REPEAT_LENGTH)
     46 #define WEXT_PNO_MAX_REPEAT_SECTION	'M'
     47 #define WEXT_PNO_MAX_REPEAT_LENGTH	1
     48 #define WEXT_PNO_MAX_REPEAT		3
     49 /* Max Repeat section size is Max Repeat section type + Max Repeat value length
     50  * above */
     51 #define WEXT_PNO_MAX_REPEAT_SIZE	(1 + WEXT_PNO_MAX_REPEAT_LENGTH)
     52 /* This corresponds to the size of all sections expect SSIDs */
     53 #define WEXT_PNO_NONSSID_SECTIONS_SIZE \
     54 (WEXT_PNO_SCAN_INTERVAL_SIZE + WEXT_PNO_REPEAT_SIZE + WEXT_PNO_MAX_REPEAT_SIZE)
     55 /* PNO Max command size is total of header, version, ssid and other sections +
     56  * Null termination */
     57 #define WEXT_PNO_MAX_COMMAND_SIZE \
     58 	(WEXT_PNOSETUP_HEADER_SIZE + WEXT_PNO_VERSION_SIZE \
     59 	 + WEXT_PNO_AMOUNT * (WEXT_PNO_SSID_HEADER_SIZE + MAX_SSID_LEN) \
     60 	 + WEXT_PNO_NONSSID_SECTIONS_SIZE + 1)
     61 
     62 #endif /* ANDROID_DRV_H */
     63