Home | History | Annotate | Download | only in inc
      1 /*
      2  * CmdInterpretWext.h
      3  *
      4  * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.
      5  * All rights reserved.
      6  *
      7  * Redistribution and use in source and binary forms, with or without
      8  * modification, are permitted provided that the following conditions
      9  * are met:
     10  *
     11  *  * Redistributions of source code must retain the above copyright
     12  *    notice, this list of conditions and the following disclaimer.
     13  *  * Redistributions in binary form must reproduce the above copyright
     14  *    notice, this list of conditions and the following disclaimer in
     15  *    the documentation and/or other materials provided with the
     16  *    distribution.
     17  *  * Neither the name Texas Instruments nor the names of its
     18  *    contributors may be used to endorse or promote products derived
     19  *    from this software without specific prior written permission.
     20  *
     21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     24  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     25  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     26  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     27  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     28  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     29  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     30  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     31  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     32  */
     33 
     34 #ifndef _CMD_INTERPRET_WEXT_H_
     35 #define _CMD_INTERPRET_WEXT_H_
     36 /*  Command interpreter header file */
     37 
     38 #include <linux/wireless.h>
     39 
     40 typedef struct
     41 {
     42     TI_UINT8 iw_auth_wpa_version;
     43     TI_UINT8 iw_auth_cipher_pairwise;
     44     TI_UINT8 iw_auth_cipher_group;
     45     TI_UINT8 iw_auth_key_mgmt;
     46     TI_UINT8 iw_auth_80211_auth_alg;
     47 } wext_auth_info;
     48 
     49 typedef struct
     50 {
     51     TI_HANDLE               hOs;            /* Pointer to the adapter object */
     52 	TI_UINT8				nickName[IW_ESSID_MAX_SIZE + 1]; 	/* Interface nickname */
     53 	wext_auth_info			wai;			/* Authentication parameters */
     54 	struct iw_statistics 	wstats;			/* Statistics information */
     55     TI_HANDLE               hEvHandler;     /* Event-handler module handle */
     56 	TI_HANDLE				hCmdHndlr;		/* Handle to the Command-Handler */
     57 	TI_HANDLE				hCmdDispatch;	/* Handle to the Command-Dispatcher */
     58 	TI_HANDLE				hEvents[IPC_EVENT_MAX];	/* Contains handlers of events registered to */
     59     TConfigCommand         *pAsyncCmd;       /* Pointer to the command currently being processed */
     60     void                   *pAllocatedBuffer;
     61     TI_UINT32              AllocatedBufferSize;
     62 } cmdInterpret_t;
     63 
     64 #define WLAN_PROTOCOL_NAME    "IEEE 802.11ABG"
     65 
     66 typedef enum _TIWLAN_KEY_FLAGS
     67 {
     68 	TIWLAN_KEY_FLAGS_TRANSMIT		= 0x80000000,           /* Used whenever key should be immidiately used for TX */
     69 	TIWLAN_KEY_FLAGS_PAIRWISE		= 0x40000000,           /* Used to indicate pairwise key */
     70 	TIWLAN_KEY_FLAGS_SET_KEY_RSC	= 0x20000000,           /* Used to set RSC (receive sequence counter) to driver */
     71 	TIWLAN_KEY_FLAGS_AUTHENTICATOR	= 0x10000000            /* Not used currently */
     72 } TIWLAN_KEY_FLAGS;
     73 
     74 #define TKIP_KEY_LENGTH		32
     75 #define AES_KEY_LENGTH      16
     76 #define WEP_KEY_LENGTH_40   5
     77 #define WEP_KEY_LENGTH_104   13
     78 
     79 #define MAX_THROUGHPUT 5500000
     80 
     81 #define WEXT_OK					0
     82 #define WEXT_NOT_SUPPORTED		-EOPNOTSUPP
     83 #define WEXT_INVALID_PARAMETER  -EINVAL
     84 
     85 #endif /* _CMD_INTERPRET_WEXT_H_ */
     86