Home | History | Annotate | Download | only in wpa_supplicant_lib
      1 /*
      2  * Redistribution and use in source and binary forms, with or without
      3  * modification, are permitted provided that the following conditions
      4  * are met:
      5  * 1. Redistributions of source code must retain the above copyright
      6  *    notice, this list of conditions and the following disclaimer.
      7  * 2. Redistributions in binary form must reproduce the above copyright
      8  *    notice, this list of conditions and the following disclaimer in the
      9  *    documentation and/or other materials provided with the distribution.
     10  *
     11  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
     12  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     13  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     14  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
     15  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     16  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     17  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     18  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     19  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     20  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     21  * SUCH DAMAGE.
     22  *
     23  */
     24 #ifndef _DRIVER_TI_H_
     25 #define _DRIVER_TI_H_
     26 
     27 #include "wireless_copy.h"
     28 #include "common.h"
     29 #include "driver.h"
     30 #include "l2_packet.h"
     31 #include "eloop.h"
     32 #include "priv_netlink.h"
     33 #include "driver_wext.h"
     34 #include "wpa_ctrl.h"
     35 #include "wpa_supplicant_i.h"
     36 #include "config.h"
     37 #ifdef WPA_SUPPLICANT_VER_0_6_X
     38 #include "ieee802_11_defs.h"
     39 #else
     40 #include "wpa.h"
     41 #endif
     42 #include "cu_ostypes.h"
     43 #include "STADExternalIf.h"
     44 #include "convert.h"
     45 #include "shlist.h"
     46 
     47 #define TIWLAN_DRV_NAME         "tiwlan0"
     48 
     49 #define NUMBER_SCAN_CHANNELS_FCC        11
     50 #define NUMBER_SCAN_CHANNELS_ETSI       13
     51 #define NUMBER_SCAN_CHANNELS_MKK1       14
     52 
     53 #define RX_SELF_FILTER			0
     54 #define RX_BROADCAST_FILTER		1
     55 #define RX_IPV4_MULTICAST_FILTER	2
     56 #define RX_IPV6_MULTICAST_FILTER	3
     57 
     58 #define MAX_NUMBER_SEQUENTIAL_ERRORS	4
     59 
     60 typedef enum {
     61 	BLUETOOTH_COEXISTENCE_MODE_ENABLED = 0,
     62 	BLUETOOTH_COEXISTENCE_MODE_DISABLED,
     63 	BLUETOOTH_COEXISTENCE_MODE_SENSE
     64 } EUIBTCoexMode;
     65 
     66 struct wpa_driver_ti_data {
     67 	void *wext; /* private data for driver_wext */
     68 	void *ctx;
     69 	char ifname[IFNAMSIZ + 1];
     70 	int ioctl_sock;
     71 	u8 own_addr[ETH_ALEN];          /* MAC address of WLAN interface */
     72 	int driver_is_loaded;           /* TRUE/FALSE flag if driver is already loaded and can be accessed */
     73 	int scan_type;                  /* SCAN_TYPE_NORMAL_ACTIVE or  SCAN_TYPE_NORMAL_PASSIVE */
     74 	int force_merge_flag;		/* Force scan results merge */
     75 	int scan_channels;              /* Number of allowed scan channels */
     76 	unsigned int link_speed;        /* Link Speed */
     77 	u32 btcoex_mode;		/* BtCoex Mode */
     78 	int last_scan;			/* Last scan type */
     79 	SHLIST scan_merge_list;		/* Previous scan list */
     80 #ifdef CONFIG_WPS
     81 	struct wpabuf *probe_req_ie;    /* Store the latest probe_req_ie for WSC */
     82 #endif
     83 	int errors;			/* Number of sequential errors */
     84 };
     85 #endif
     86