summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include
diff options
context:
space:
mode:
authorSrikant Patnaik2015-01-11 12:28:04 +0530
committerSrikant Patnaik2015-01-11 12:28:04 +0530
commit871480933a1c28f8a9fed4c4d34d06c439a7a422 (patch)
tree8718f573808810c2a1e8cb8fb6ac469093ca2784 /drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include
parent9d40ac5867b9aefe0722bc1f110b965ff294d30d (diff)
downloadFOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.gz
FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.bz2
FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.zip
Moved, renamed, and deleted files
The original directory structure was scattered and unorganized. Changes are basically to make it look like kernel structure.
Diffstat (limited to 'drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include')
-rwxr-xr-xdrivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/CoreConfigSimulator.h20
-rwxr-xr-xdrivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/CoreConfigurator.h485
-rwxr-xr-xdrivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/FIFO_Buffer.h23
-rwxr-xr-xdrivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/NMI_host_AP.h145
-rwxr-xr-xdrivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/host_interface.h1106
-rwxr-xr-xdrivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/itypes.h59
-rwxr-xr-xdrivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/linux_wlan_common.h122
-rwxr-xr-xdrivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/nmi_type.h34
-rwxr-xr-xdrivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/nmi_wlan.h335
-rwxr-xr-xdrivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/nmi_wlan_cfg.h33
-rwxr-xr-xdrivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/nmi_wlan_if.h925
11 files changed, 3287 insertions, 0 deletions
diff --git a/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/CoreConfigSimulator.h b/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/CoreConfigSimulator.h
new file mode 100755
index 00000000..8df2ab35
--- /dev/null
+++ b/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/CoreConfigSimulator.h
@@ -0,0 +1,20 @@
+
+/*!
+* @file CoreConfigSimulator.h
+* @brief
+* @author
+* @sa CoreConfigSimulator.c
+* @date 1 Mar 2012
+* @version 1.0
+*/
+
+
+#ifndef CORECONFIGSIMULATOR_H
+#define CORECONFIGSIMULATOR_H
+
+
+extern NMI_Sint32 CoreConfigSimulatorInit(void);
+extern NMI_Sint32 CoreConfigSimulatorDeInit(void);
+
+
+#endif \ No newline at end of file
diff --git a/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/CoreConfigurator.h b/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/CoreConfigurator.h
new file mode 100755
index 00000000..59779618
--- /dev/null
+++ b/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/CoreConfigurator.h
@@ -0,0 +1,485 @@
+
+/*!
+* @file CoreConfigurator.h
+* @brief
+* @author
+* @sa CoreConfigurator.c
+* @date 1 Mar 2012
+* @version 1.0
+*/
+
+
+#ifndef CORECONFIGURATOR_H
+#define CORECONFIGURATOR_H
+
+#include "NMI_OsWrapper/include/NMI_OSWrapper.h"
+#include "nmi_wlan_if.h"
+/*****************************************************************************/
+/* Constants */
+/*****************************************************************************/
+/* Number of WID Options Supported */
+#define NUM_BASIC_SWITCHES 45
+#define NUM_FHSS_SWITCHES 0
+
+#ifdef MAC_802_11N
+#define NUM_11N_BASIC_SWITCHES 25
+#define NUM_11N_HUT_SWITCHES 47
+#else /* MAC_802_11N */
+#define NUM_11N_BASIC_SWITCHES 0
+#define NUM_11N_HUT_SWITCHES 0
+#endif /* MAC_802_11N */
+
+#define NUM_TOTAL_SWITCHES (NUM_BASIC_SWITCHES + NUM_FHSS_SWITCHES + NUM_11N_BASIC_SWITCHES + NUM_11N_HUT_SWITCHES)
+
+#define MAC_HDR_LEN 24 /* No Address4 - non-ESS */
+#define MAX_SSID_LEN 33
+#define FCS_LEN 4
+#define TIME_STAMP_LEN 8
+#define BEACON_INTERVAL_LEN 2
+#define CAP_INFO_LEN 2
+#define STATUS_CODE_LEN 2
+#define AID_LEN 2
+#define IE_HDR_LEN 2
+
+
+/* Operating Mode: SET */
+#define SET_CFG 0
+/* Operating Mode: GET */
+#define GET_CFG 1
+
+#define MAX_PACKET_BUFF_SIZE 1596
+
+#define MAX_STRING_LEN 256
+#define MAX_SURVEY_RESULT_FRAG_SIZE MAX_STRING_LEN
+#define SURVEY_RESULT_LENGTH 44
+#define MAX_ASSOC_RESP_FRAME_SIZE MAX_STRING_LEN
+
+#define STATUS_MSG_LEN 8
+#define MAC_CONNECTED 1
+#define MAC_DISCONNECTED 0
+
+
+
+/*****************************************************************************/
+/* Function Macros */
+/*****************************************************************************/
+#define MAKE_WORD16(lsb, msb) (((NMI_Uint16)(msb) << 8) & 0xFF00) | (lsb)
+#define MAKE_WORD32(lsw, msw) (((NMI_Uint32)(msw) << 16) & 0xFFFF0000) | (lsw)
+
+
+/*****************************************************************************/
+/* Type Definitions */
+/*****************************************************************************/
+/* WID Data Types */
+#if 0
+typedef enum {WID_CHAR = 0,
+ WID_SHORT = 1,
+ WID_INT = 2,
+ WID_STR = 3,
+ WID_ADR = 4,
+ WID_BIN = 5,
+ WID_IP = 6,
+ WID_UNDEF = 7,
+ WID_TYPE_FORCE_32BIT = 0xFFFFFFFF
+} tenuWIDtype;
+
+/* WLAN Identifiers */
+typedef enum {WID_NIL = -1,
+
+ /* EMAC Character WID list */
+ WID_BSS_TYPE = 0x0000,
+ WID_CURRENT_TX_RATE = 0x0001,
+ WID_CURRENT_CHANNEL = 0x0002,
+ WID_PREAMBLE = 0x0003,
+ WID_11G_OPERATING_MODE = 0x0004,
+ WID_STATUS = 0x0005,
+ WID_11G_PROT_MECH = 0x0006,
+ WID_SCAN_TYPE = 0x0007,
+ WID_PRIVACY_INVOKED = 0x0008,
+ WID_KEY_ID = 0x0009,
+ WID_QOS_ENABLE = 0x000A,
+ WID_POWER_MANAGEMENT = 0x000B,
+ WID_11I_MODE = 0x000C,
+ WID_AUTH_TYPE = 0x000D,
+ WID_SITE_SURVEY = 0x000E,
+ WID_LISTEN_INTERVAL = 0x000F,
+ WID_DTIM_PERIOD = 0x0010,
+ WID_ACK_POLICY = 0x0011,
+ WID_RESET = 0x0012,
+ WID_PCF_MODE = 0x0013,
+ WID_CFP_PERIOD = 0x0014,
+ WID_BCAST_SSID = 0x0015,
+ WID_PHY_TEST_PATTERN = 0x0016,
+ WID_DISCONNECT = 0x0016,
+ WID_READ_ADDR_SDRAM = 0x0017,
+ WID_TX_POWER_LEVEL_11A = 0x0018,
+ WID_REKEY_POLICY = 0x0019,
+ WID_SHORT_SLOT_ALLOWED = 0x001A,
+ WID_PHY_ACTIVE_REG = 0x001B,
+ WID_PHY_ACTIVE_REG_VAL = 0x001C,
+ WID_TX_POWER_LEVEL_11B = 0x001D,
+ WID_START_SCAN_REQ = 0x001E,
+ WID_RSSI = 0x001F,
+ WID_JOIN_REQ = 0x0020,
+ WID_ANTENNA_SELECTION = 0x0021,
+ WID_USER_CONTROL_ON_TX_POWER = 0x0027,
+ WID_MEMORY_ACCESS_8BIT = 0x0029,
+ WID_UAPSD_SUPPORT_AP = 0x002A,
+ WID_CURRENT_MAC_STATUS = 0x0031,
+ WID_AUTO_RX_SENSITIVITY = 0x0032,
+ WID_DATAFLOW_CONTROL = 0x0033,
+ WID_SCAN_FILTER = 0x0036,
+ WID_LINK_LOSS_THRESHOLD = 0x0037,
+ WID_AUTORATE_TYPE = 0x0038,
+ WID_CCA_THRESHOLD = 0x0039,
+ WID_802_11H_DFS_MODE = 0x003B,
+ WID_802_11H_TPC_MODE = 0x003C,
+ WID_DEVICE_READY = 0x003D,
+ WID_PM_NULL_FRAME_INTERVAL = 0x003E,
+ WID_PM_ACTIVITY_TIMER = 0x003F,
+ WID_PM_NULL_FRAME_WAIT_ENABLE = 0x0040,
+ WID_SCAN_WAIT_TIME = 0x0041,
+ WID_WSC_IE_EN = 0x0042,
+ WID_WPS_START = 0x0043,
+ WID_WPS_DEV_MODE = 0x0044,
+ WID_BT_COEXISTENCE = 0x0050,
+ WID_TRACKING_ROAMING = 0x0070,
+ WID_NUM_PKTS_FOR_RSSI_AVG = 0x0071,
+ WID_FHSS_SCAN_CHAN_INDEX = 0x0072,
+ WID_FHSS_SCAN_STEP_INDEX = 0x0073,
+
+ /* NMAC Character WID list */
+ WID_11N_PROT_MECH = 0x0080,
+ WID_11N_ERP_PROT_TYPE = 0x0081,
+ WID_11N_ENABLE = 0x0082,
+ WID_11N_OPERATING_MODE = 0x0083,
+ WID_11N_OBSS_NONHT_DETECTION = 0x0084,
+ WID_11N_HT_PROT_TYPE = 0x0085,
+ WID_11N_RIFS_PROT_ENABLE = 0x0086,
+ WID_11N_SMPS_MODE = 0x0087,
+ WID_11N_CURRENT_TX_MCS = 0x0088,
+ WID_11N_PRINT_STATS = 0x0089,
+ WID_HUT_FCS_CORRUPT_MODE = 0x008A,
+ WID_HUT_RESTART = 0x008B,
+ WID_HUT_TX_FORMAT = 0x008C,
+ WID_11N_SHORT_GI_20MHZ_ENABLE = 0x008D,
+ WID_HUT_BANDWIDTH = 0x008E,
+ WID_HUT_OP_BAND = 0x008F,
+ WID_HUT_STBC = 0x0090,
+ WID_HUT_ESS = 0x0091,
+ WID_HUT_ANTSET = 0x0092,
+ WID_HUT_HT_OP_MODE = 0x0093,
+ WID_HUT_RIFS_MODE = 0x0094,
+ WID_HUT_SMOOTHING_REC = 0x0095,
+ WID_HUT_SOUNDING_PKT = 0x0096,
+ WID_HUT_HT_CODING = 0x0097,
+ WID_HUT_TEST_DIR = 0x0098,
+ WID_HUT_CAPTURE_MODE = 0x0099,
+ WID_HUT_PHY_TEST_MODE = 0x009A,
+ WID_HUT_PHY_TEST_RATE_HI = 0x009B,
+ WID_HUT_PHY_TEST_RATE_LO = 0x009C,
+ WID_HUT_DISABLE_RXQ_REPLENISH = 0x009D,
+ WID_HUT_KEY_ORIGIN = 0x009E,
+ WID_HUT_BCST_PERCENT = 0x009F,
+ WID_HUT_GROUP_CIPHER_TYPE = 0x00A0,
+ WID_TX_ABORT_CONFIG = 0x00A1,
+ WID_HOST_DATA_IF_TYPE = 0x00A2,
+ WID_HOST_CONFIG_IF_TYPE = 0x00A3,
+ WID_HUT_TSF_TEST_MODE = 0x00A4,
+ WID_HUT_TSSI_VALUE = 0x00A5,
+ WID_HUT_PKT_TSSI_VALUE = 0x00A5,
+ WID_REG_TSSI_11B_VALUE = 0x00A6,
+ WID_REG_TSSI_11G_VALUE = 0x00A7,
+ WID_REG_TSSI_11N_VALUE = 0x00A8,
+ WID_TX_CALIBRATION = 0x00A9,
+ WID_DSCR_TSSI_11B_VALUE = 0x00AA,
+ WID_DSCR_TSSI_11G_VALUE = 0x00AB,
+ WID_DSCR_TSSI_11N_VALUE = 0x00AC,
+ WID_HUT_RSSI_EX = 0x00AD,
+ WID_HUT_ADJ_RSSI_EX = 0x00AE,
+ WID_11N_IMMEDIATE_BA_ENABLED = 0x00AF,
+ WID_11N_TXOP_PROT_DISABLE = 0x00B0,
+ WID_TX_POWER_LEVEL_11N = 0x00B1,
+ WID_HUT_MGMT_PERCENT = 0x00B3,
+ WID_HUT_MGMT_BCST_PERCENT = 0x00B4,
+ WID_HUT_MGMT_ALLOW_HT = 0x00B5,
+ WID_HUT_UC_MGMT_TYPE = 0x00B6,
+ WID_HUT_BC_MGMT_TYPE = 0x00B7,
+ WID_HUT_11W_MFP_REQUIRED_TX = 0x00B8,
+ WID_HUT_11W_MFP_PEER_CAPABLE = 0x00B9,
+ WID_HUT_11W_TX_IGTK_ID = 0x00BA,
+ WID_11W_ENABLE = 0x00BB,
+ WID_11W_MGMT_PROT_REQ = 0x00BC,
+ WID_USER_SEC_CHANNEL_OFFSET = 0x00C0,
+ WID_2040_COEXISTENCE = 0x00C1,
+ WID_HUT_FC_TXOP_MOD = 0x00C2,
+ WID_HUT_FC_PROT_TYPE = 0x00C3,
+ WID_HUT_SEC_CCA_ASSERT = 0x00C4,
+ WID_2040_ENABLE = 0x00C5,
+ WID_2040_CURR_CHANNEL_OFFSET = 0x00C6,
+ WID_2040_40MHZ_INTOLERANT = 0x00C7,
+
+
+ /* Custom Character WID list */
+ WID_POWER_SAVE = 0x0100,
+ WID_WAKE_STATUS = 0x0101,
+ WID_WAKE_CONTROL = 0x0102,
+ WID_CCA_BUSY_START = 0x0103,
+
+ /* EMAC Short WID list */
+ WID_RTS_THRESHOLD = 0x1000,
+ WID_FRAG_THRESHOLD = 0x1001,
+ WID_SHORT_RETRY_LIMIT = 0x1002,
+ WID_LONG_RETRY_LIMIT = 0x1003,
+ WID_CFP_MAX_DUR = 0x1004,
+ WID_PHY_TEST_FRAME_LEN = 0x1005,
+ WID_BEACON_INTERVAL = 0x1006,
+ WID_MEMORY_ACCESS_16BIT = 0x1008,
+ WID_RX_SENSE = 0x100B,
+ WID_ACTIVE_SCAN_TIME = 0x100C,
+ WID_PASSIVE_SCAN_TIME = 0x100D,
+ WID_SITE_SURVEY_SCAN_TIME = 0x100E,
+ WID_JOIN_START_TIMEOUT = 0x100F,
+ WID_AUTH_TIMEOUT = 0x1010,
+ WID_ASOC_TIMEOUT = 0x1011,
+ WID_11I_PROTOCOL_TIMEOUT = 0x1012,
+ WID_EAPOL_RESPONSE_TIMEOUT = 0x1013,
+ WID_WPS_PASS_ID = 0x1017,
+ WID_WPS_CONFIG_METHOD = 0x1018,
+ WID_FHSS_INIT_SCAN_TIME = 0x1070,
+ WID_FHSS_ROAM_SCAN_TIME = 0x1071,
+
+ /* NMAC Short WID list */
+ WID_11N_RF_REG_VAL = 0x1080,
+ WID_HUT_FRAME_LEN = 0x1081,
+ WID_HUT_TXOP_LIMIT = 0x1082,
+ WID_HUT_SIG_QUAL_AVG = 0x1083,
+ WID_HUT_SIG_QUAL_AVG_CNT = 0x1084,
+ WID_11N_SIG_QUAL_VAL = 0x1085,
+ WID_HUT_RSSI_EX_COUNT = 0x1086,
+ WID_HUT_UC_MGMT_FRAME_LEN = 0x1088,
+ WID_HUT_BC_MGMT_FRAME_LEN = 0x1089,
+
+ /* Custom Short WID list */
+
+ WID_CCA_BUSY_STATUS = 0x1100,
+
+ /* EMAC Integer WID list */
+ WID_FAILED_COUNT = 0x2000,
+ WID_RETRY_COUNT = 0x2001,
+ WID_MULTIPLE_RETRY_COUNT = 0x2002,
+ WID_FRAME_DUPLICATE_COUNT = 0x2003,
+ WID_ACK_FAILURE_COUNT = 0x2004,
+ WID_RECEIVED_FRAGMENT_COUNT = 0x2005,
+ WID_MCAST_RECEIVED_FRAME_COUNT = 0x2006,
+ WID_FCS_ERROR_COUNT = 0x2007,
+ WID_SUCCESS_FRAME_COUNT = 0x2008,
+ WID_PHY_TEST_PKT_CNT = 0x2009,
+ WID_HUT_TX_COUNT = 0x200A,
+ WID_TX_FRAGMENT_COUNT = 0x200B,
+ WID_TX_MULTICAST_FRAME_COUNT = 0x200C,
+ WID_RTS_SUCCESS_COUNT = 0x200D,
+ WID_RTS_FAILURE_COUNT = 0x200E,
+ WID_WEP_UNDECRYPTABLE_COUNT = 0x200F,
+ WID_REKEY_PERIOD = 0x2010,
+ WID_REKEY_PACKET_COUNT = 0x2011,
+ WID_1X_SERV_ADDR = 0x2012,
+ WID_STACK_IP_ADDR = 0x2013,
+ WID_STACK_NETMASK_ADDR = 0x2014,
+ WID_HW_RX_COUNT = 0x2015,
+ WID_MEMORY_ADDRESS = 0x201E,
+ WID_MEMORY_ACCESS_32BIT = 0x201F,
+ WID_RF_REG_VAL = 0x2021,
+ WID_FIRMWARE_INFO = 0x2023,
+ WID_DEV_OS_VERSION = 0x2025,
+ WID_ROAM_RSSI_THESHOLDS = 0x2070,
+ WID_TRACK_INTERVAL_SEC = 0x2071,
+ WID_FHSS_HOPPING_PARAMS = 0x2072,
+ WID_FHSS_HOP_DWELL_TIME = 0x2073,
+
+ /* NMAC Integer WID list */
+ WID_11N_PHY_ACTIVE_REG_VAL = 0x2080,
+ WID_HUT_NUM_TX_PKTS = 0x2081,
+ WID_HUT_TX_TIME_TAKEN = 0x2082,
+ WID_HUT_TX_TEST_TIME = 0x2083,
+ WID_HUT_LOG_INTERVAL = 0x2084,
+
+ /* EMAC String WID list */
+ WID_SSID = 0x3000,
+ WID_FIRMWARE_VERSION = 0x3001,
+ WID_OPERATIONAL_RATE_SET = 0x3002,
+ WID_BSSID = 0x3003,
+#if 0
+ WID_WEP_KEY_VALUE0 = 0x3004,
+#endif
+ WID_11I_PSK = 0x3008,
+ WID_11E_P_ACTION_REQ = 0x3009,
+ WID_1X_KEY = 0x300A,
+ WID_HARDWARE_VERSION = 0x300B,
+ WID_MAC_ADDR = 0x300C,
+ WID_HUT_DEST_ADDR = 0x300D,
+ /*WID_HUT_STATS = 0x300E,*/
+ WID_PHY_VERSION = 0x300F,
+ WID_SUPP_USERNAME = 0x3010,
+ WID_SUPP_PASSWORD = 0x3011,
+ WID_SITE_SURVEY_RESULTS = 0x3012,
+ WID_RX_POWER_LEVEL = 0x3013,
+ WID_MANUFACTURER = 0x3026, /*Added for CAPI tool */
+ WID_MODEL_NAME = 0x3027, /*Added for CAPI tool */
+ WID_MODEL_NUM = 0x3028, /*Added for CAPI tool */
+ WID_DEVICE_NAME = 0x3029, /*Added for CAPI tool */
+
+ WID_ASSOC_RES_INFO = 0x3020,
+
+ /* NMAC String WID list */
+ WID_11N_P_ACTION_REQ = 0x3080,
+ WID_HUT_TEST_ID = 0x3081,
+ WID_PMKID_INFO = 0x3082,
+
+ /* Custom String WID list */
+ WID_FLASH_DATA = 0x3100,
+ WID_EEPROM_DATA = 0x3101,
+ WID_SERIAL_NUMBER = 0x3102,
+
+ /* EMAC Binary WID list */
+ WID_UAPSD_CONFIG = 0x4001,
+ WID_UAPSD_STATUS = 0x4002,
+ WID_AC_PARAMS_AP = 0x4003,
+ WID_AC_PARAMS_STA = 0x4004,
+ WID_NEWORK_INFO = 0x4005,
+ WID_WPS_CRED_LIST = 0x4006,
+ WID_PRIM_DEV_TYPE = 0x4007,
+ WID_STA_JOIN_INFO = 0x4008,
+ WID_CONNECTED_STA_LIST = 0x4009,
+
+ /* NMAC Binary WID list */
+ WID_11N_AUTORATE_TABLE = 0x4080,
+ WID_HUT_TX_PATTERN = 0x4081,
+ WID_HUT_STATS = 0x4082,
+ WID_HUT_LOG_STATS = 0x4083,
+
+ /*BugID_3746 WID to add IE to be added in next probe request*/
+ WID_INFO_ELEMENT_PROBE = 0x4085,
+ /*BugID_3746 WID to add IE to be added in next associate request*/
+ WID_INFO_ELEMENT_ASSOCIATE = 0x4086,
+
+ /* Miscellaneous WIDs */
+ WID_ALL = 0x7FFE,
+ WID_MAX = 0xFFFF
+} tenuWIDid;
+#endif
+
+/* Status Codes for Authentication and Association Frames */
+typedef enum
+{
+ SUCCESSFUL_STATUSCODE = 0,
+ UNSPEC_FAIL = 1,
+ UNSUP_CAP = 10,
+ REASOC_NO_ASOC = 11,
+ FAIL_OTHER = 12,
+ UNSUPT_ALG = 13,
+ AUTH_SEQ_FAIL = 14,
+ CHLNG_FAIL = 15,
+ AUTH_TIMEOUT = 16,
+ AP_FULL = 17,
+ UNSUP_RATE = 18,
+ SHORT_PREAMBLE_UNSUP = 19,
+ PBCC_UNSUP = 20,
+ CHANNEL_AGIL_UNSUP = 21,
+ SHORT_SLOT_UNSUP = 25,
+ OFDM_DSSS_UNSUP = 26,
+ CONNECT_STS_FORCE_16_BIT = 0xFFFF
+} tenuConnectSts;
+
+typedef struct
+{
+ NMI_Uint16 u16WIDid;
+ tenuWIDtype enuWIDtype;
+ NMI_Sint32 s32ValueSize;
+ NMI_Sint8 *ps8WidVal;
+
+}tstrWID;
+/* This structure is used to support parsing of the received 'N' message */
+typedef struct
+{
+ NMI_Sint8 s8rssi;
+ NMI_Uint16 u16CapInfo;
+ NMI_Uint8 au8ssid[MAX_SSID_LEN];
+ NMI_Uint8 u8SsidLen;
+ NMI_Uint8 au8bssid[6];
+ NMI_Uint16 u16BeaconPeriod;
+ NMI_Uint8 u8DtimPeriod;
+ NMI_Uint8 u8channel;
+ unsigned long u32TimeRcvdInScan; /* of type unsigned long to be accepted by the linux kernel macro time_after() */
+
+ NMI_Uint8 *pu8IEs;
+ NMI_Uint16 u16IEsLen;
+}tstrNetworkInfo;
+
+/* This structure is used to support parsing of the received Association Response frame */
+typedef struct
+{
+ NMI_Uint16 u16capability;
+ NMI_Uint16 u16ConnectStatus;
+ NMI_Uint16 u16AssocID;
+ NMI_Uint8 *pu8RespIEs;
+ NMI_Uint16 u16RespIEsLen;
+}tstrConnectRespInfo;
+
+
+typedef struct
+{
+ NMI_Uint8 au8bssid[6];
+ NMI_Uint8* pu8ReqIEs;
+ size_t ReqIEsLen;
+ NMI_Uint8 *pu8RespIEs;
+ NMI_Uint16 u16RespIEsLen;
+ NMI_Uint16 u16ConnectStatus;
+}tstrConnectInfo;
+
+typedef struct
+{
+ NMI_Uint16 u16reason;
+ NMI_Uint8 * ie;
+ size_t ie_len;
+}tstrDisconnectNotifInfo;
+
+#ifndef CONNECT_DIRECT
+typedef struct wid_site_survey_reslts
+{
+ NMI_Char SSID[MAX_SSID_LEN];
+ NMI_Uint8 BssType;
+ NMI_Uint8 Channel;
+ NMI_Uint8 SecurityStatus;
+ NMI_Uint8 BSSID[6];
+ NMI_Char RxPower;
+ NMI_Uint8 Reserved;
+
+}wid_site_survey_reslts_s;
+#endif
+
+extern NMI_Sint32 CoreConfiguratorInit(void);
+extern NMI_Sint32 CoreConfiguratorDeInit(void);
+
+extern NMI_Sint32 SendConfigPkt(NMI_Uint8 u8Mode, tstrWID* pstrWIDs,
+ NMI_Uint32 u32WIDsCount,NMI_Bool bRespRequired);
+extern NMI_Sint32 ParseNetworkInfo(NMI_Uint8* pu8MsgBuffer, tstrNetworkInfo** ppstrNetworkInfo);
+extern NMI_Sint32 DeallocateNetworkInfo(tstrNetworkInfo* pstrNetworkInfo);
+
+extern NMI_Sint32 ParseAssocRespInfo(NMI_Uint8* pu8Buffer, NMI_Uint32 u32BufferLen,
+ tstrConnectRespInfo** ppstrConnectRespInfo);
+extern NMI_Sint32 DeallocateAssocRespInfo(tstrConnectRespInfo* pstrConnectRespInfo);
+
+#ifndef CONNECT_DIRECT
+extern NMI_Sint32 ParseSurveyResults(NMI_Uint8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZE],
+ wid_site_survey_reslts_s** ppstrSurveyResults,
+ NMI_Uint32* pu32SurveyResultsCount);
+extern NMI_Sint32 DeallocateSurveyResults(wid_site_survey_reslts_s* pstrSurveyResults);
+#endif
+
+extern NMI_Sint32 SendRawPacket(NMI_Sint8* pspacket, NMI_Sint32 s32PacketLen);
+extern void NetworkInfoReceived(NMI_Uint8* pu8Buffer,NMI_Uint32 u32Length);
+void GnrlAsyncInfoReceived(NMI_Uint8* pu8Buffer, NMI_Uint32 u32Length);
+void host_int_ScanCompleteReceived(NMI_Uint8 * pu8Buffer, NMI_Uint32 u32Length);
+
+#endif
diff --git a/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/FIFO_Buffer.h b/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/FIFO_Buffer.h
new file mode 100755
index 00000000..086ca1ac
--- /dev/null
+++ b/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/FIFO_Buffer.h
@@ -0,0 +1,23 @@
+
+#include "NMI_OsWrapper/include/NMI_OSWrapper.h"
+
+
+#define tHANDLE void *
+
+typedef struct
+{
+ NMI_Uint8 *pu8Buffer;
+ NMI_Uint32 u32BufferLength;
+ NMI_Uint32 u32WriteOffset;
+ NMI_Uint32 u32ReadOffset;
+ NMI_Uint32 u32TotalBytes;
+ NMI_SemaphoreHandle SemBuffer;
+}tstrFifoHandler;
+
+
+extern NMI_Uint32 FIFO_InitBuffer(tHANDLE * hBuffer,NMI_Uint32 u32BufferLength);
+extern NMI_Uint32 FIFO_DeInit(tHANDLE hFifo);
+extern NMI_Uint32 FIFO_ReadBytes(tHANDLE hFifo,NMI_Uint8 *pu8Buffer,NMI_Uint32 u32BytesToRead,
+ NMI_Uint32 *pu32BytesRead);
+extern NMI_Uint32 FIFO_WriteBytes(tHANDLE hFifo,NMI_Uint8 *pu8Buffer,NMI_Uint32 u32BytesToWrite,
+ NMI_Bool bForceOverWrite); \ No newline at end of file
diff --git a/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/NMI_host_AP.h b/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/NMI_host_AP.h
new file mode 100755
index 00000000..9dac67f4
--- /dev/null
+++ b/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/NMI_host_AP.h
@@ -0,0 +1,145 @@
+#ifndef __NMI_HOST_AP__
+#define __NMI_HOST_AP__
+
+#include "nmi_wlan_if.h"
+#include "nmi_wlan.h"
+#include "host_interface.h"
+
+#ifdef NMI_FULLY_HOSTING_AP
+/*!
+* @file NMI_host_AP.h
+* @brief code related to AP fully hosting mode on NMI driver
+* @author asobhy
+* @date 09 APRIL 2013
+* @version 1.0
+*/
+
+
+
+
+#define ITIM 5 /* Traffic Information Map */
+#define DEFAULT_TIM_LEN 4
+#define FCS_LEN 4
+#define VBMAP_SIZE 256
+
+
+#define WIFI_PERIPH_BASE 0x00000000
+#define WIFI_PA_BASE (WIFI_PERIPH_BASE+0x9800)
+#define PA_BASE WIFI_PA_BASE
+
+#define rMAC_DTIM_COUNT_ADDR (( NMI_Uint32 )(PA_BASE + 0x021C))
+#define rMAC_BEACON_PERIOD (( NMI_Uint32 )(PA_BASE + 0x020C))
+#define rMAC_DTIM_PERIOD (( NMI_Uint32 )(PA_BASE + 0x0210))
+#define rMAC_TSF_CON (( NMI_Uint32 )(PA_BASE + 0x0200))
+
+
+
+typedef enum {TYPE_OFFSET = 0,
+ LENGTH_OFFSET = 1,
+ DTIM_CNT_OFFSET = 2,
+ DTIM_PERIOD_OFFSET = 3,
+ BMAP_CTRL_OFFSET = 4,
+ TIM_OFFSET = 5
+} OFFSET_T;
+
+typedef struct {
+ int size;
+ void* buff;
+}beacon_data;
+
+typedef struct {
+ NMI_Uint16 u16beacon_len;
+ NMI_Uint8 *u8beacon_frame;
+ NMI_Uint8 u8tim_element_index;
+ NMI_Uint16 u16tim_element_trailer_len;
+ NMI_Uint8 u8vbmap[VBMAP_SIZE];
+ NMI_Uint8 u8DTIMPeriod;
+ NMI_Uint16 u16Beacon_Period;
+}beacon_info;
+
+typedef struct {
+ int quit;
+
+ /**
+ input interface functions
+ **/
+ nmi_wlan_os_func_t os_func;
+ nmi_wlan_io_func_t io_func;
+ nmi_wlan_net_func_t net_func;
+ nmi_wlan_indicate_func_t indicate_func;
+
+ /**
+ host interface functions
+ **/
+ nmi_hif_func_t hif_func;
+ void *hif_lock;
+
+ /**
+ configuration interface functions
+ **/
+ nmi_cfg_func_t cif_func;
+ int cfg_frame_in_use;
+ nmi_cfg_frame_t cfg_frame;
+ uint32_t cfg_frame_offset;
+ int cfg_seq_no;
+ void *cfg_wait;
+
+ /**
+ RX buffer
+ **/
+ uint32_t rx_buffer_size;
+ //uint8_t *rx_buffer;
+ //uint32_t rx_buffer_offset;
+
+ /**
+ TX buffer
+ **/
+ uint32_t tx_buffer_size;
+ uint8_t *tx_buffer;
+ uint32_t tx_buffer_offset;
+
+ /**
+ TX queue
+ **/
+ void *txq_lock;
+ struct txq_entry_t *txq_head;
+ struct txq_entry_t *txq_tail;
+ int txq_entries;
+ void *txq_wait;
+ int txq_exit;
+
+ /**
+ RX queue
+ **/
+ void *rxq_lock;
+ struct rxq_entry_t *rxq_head;
+ struct rxq_entry_t *rxq_tail;
+ int rxq_entries;
+ void *rxq_wait;
+ int rxq_exit;
+
+#if DMA_VER == DMA_VER_2
+ int use_dma_v2;
+#endif
+} nmi_wlan_dev_t;
+
+
+ NMI_Sint32 host_add_beacon(NMI_WFIDrvHandle hWFIDrv, NMI_Uint32 u32Interval,
+ NMI_Uint32 u32DTIMPeriod,
+ NMI_Uint32 u32HeadLen, NMI_Uint8* pu8Head,
+ NMI_Uint32 u32TailLen, NMI_Uint8* pu8Tail);
+
+ NMI_Sint32 host_del_beacon(NMI_WFIDrvHandle hWFIDrv);
+
+ void process_tbtt_isr(void);
+
+ nmi_wlan_dev_t* Get_wlan_context(NMI_Uint16* pu16size);
+
+ #ifdef NMI_AP_EXTERNAL_MLME
+int nmi_wlan_txq_add_mgmt_pkt(void *priv, uint8_t *buffer, uint32_t buffer_size, nmi_tx_complete_func_t func);
+#endif
+
+
+#endif // NMI_FULLY_HOSTING_AP
+
+#endif
diff --git a/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/host_interface.h b/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/host_interface.h
new file mode 100755
index 00000000..7d7ddbbb
--- /dev/null
+++ b/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/host_interface.h
@@ -0,0 +1,1106 @@
+/*!
+* @file host_interface.h
+* @brief File containg host interface APIs
+* @author zsalah
+* @sa host_interface.c
+* @date 8 March 2012
+* @version 1.0
+*/
+
+#ifndef HOST_INT_H
+#define HOST_INT_H
+
+#include "CoreConfigurator.h"
+#include "CoreConfigSimulator.h"
+/*****************************************************************************/
+/* Macros */
+/*****************************************************************************/
+#if 0
+#define WID_BSS_TYPE 0x0000
+#define WID_CURRENT_TX_RATE 0x0001
+#define WID_CURRENT_CHANNEL 0x0002
+#define WID_PREAMBLE 0x0003
+#define WID_STATUS 0x0005
+#define WID_SCAN_TYPE 0x0007
+#define WID_KEY_ID 0x0009
+#define WID_DTIM_PERIOD 0x0010
+#define WID_POWER_MANAGEMENT 0x000B
+#define WID_AUTH_TYPE 0x000D
+#define WID_SITE_SURVEY 0x000E
+#define WID_DTIM_PERIOD 0x0010
+#define WID_DISCONNECT 0x0016
+#define WID_SHORT_SLOT_ALLOWED 0x001A
+#define WID_START_SCAN_REQ 0x001E
+#define WID_RSSI 0x001F
+#define WID_JOIN_REQ 0x0020
+#define WID_11N_TXOP_PROT_DISABLE 0x00B0
+#define WID_RTS_THRESHOLD 0x1000
+#define WID_FRAG_THRESHOLD 0x1001
+#define WID_SHORT_RETRY_LIMIT 0x1002
+#define WID_LONG_RETRY_LIMIT 0x1003
+#define WID_BEACON_INTERVAL 0x1006
+#define WID_ACTIVE_SCAN_TIME 0x100C
+#define WID_PASSIVE_SCAN_TIME 0x100D
+#define WID_SITE_SURVEY_SCAN_TIME 0x100E
+#define WID_AUTH_TIMEOUT 0x1010
+#define WID_11I_PSK 0x3008
+#define WID_SITE_SURVEY_RESULTS 0x3012
+#define WID_ADD_PTK 0x301B
+#define WID_ADD_RX_GTK 0x301C
+#define WID_ADD_TX_GTK 0x301D
+#define WID_ADD_WEP_KEY 0x3019
+#define WID_REMOVE_WEP_KEY 0x301A
+#define WID_REMOVE_KEY 0x301E
+#define WID_ASSOC_REQ_INFO 0x301F
+#define WID_ASSOC_RES_INFO 0x3020
+#define WID_PMKID_INFO 0x3082
+#define WID_SCAN_CHANNEL_LIST 0x4084
+#define WID_11I_MODE 0x000C
+#endif
+#define FAIL 0x0000
+#define SUCCESS 0x0001
+
+#define BIT2 ((NMI_Uint32)(1 << 2))
+#define BIT1 ((NMI_Uint32)(1 << 1))
+#define BIT0 ((NMI_Uint32)(1 << 0))
+
+#define AP_MODE 0x01
+#define STATION_MODE 0x02
+
+
+#define MAX_NUM_STA 8
+#define ACTIVE_SCAN_TIME 10
+#define PASSIVE_SCAN_TIME 1200
+#define MIN_SCAN_TIME 10
+#define MAX_SCAN_TIME 1200
+#define DEFAULT_SCAN 0
+#define USER_SCAN BIT0
+#define OBSS_PERIODIC_SCAN BIT1
+#define OBSS_ONETIME_SCAN BIT2
+#define GTK_RX_KEY_BUFF_LEN 24
+#define ADDKEY 0x1
+#define REMOVEKEY 0x2
+#define DEFAULTKEY 0x4
+#define ADDKEY_AP 0x8
+#define MAX_NUM_SCANNED_NETWORKS 30
+#define MAX_NUM_PROBED_SSID 10 /*One more than the number of scanned ssids*/
+#define CHANNEL_SCAN_TIME 250//250
+
+#define TX_MIC_KEY_LEN 8
+#define RX_MIC_KEY_LEN 8
+#define PTK_KEY_LEN 16
+
+#define TX_MIC_KEY_MSG_LEN 26
+#define RX_MIC_KEY_MSG_LEN 48
+#define PTK_KEY_MSG_LEN 39
+
+#define PMKSA_KEY_LEN 22
+#define ETH_ALEN 6
+#define PMKID_LEN 16
+#define NMI_MAX_NUM_PMKIDS 16
+#define NMI_SUPP_MCS_SET_SIZE 16
+#define NMI_ADD_STA_LENGTH 36 /* Not including the rates field cause it has variable length*/
+#define SCAN_EVENT_DONE_ABORTED
+/*****************************************************************************/
+/* Data Types */
+/*****************************************************************************/
+//typedef unsigned char uint8;
+//typedef signed char int8;
+//typedef unsigned short uint16;
+//typedef unsigned long uint32;
+//typedef uint32 Bool;
+
+#if 0
+typedef enum {WID_CHAR = 0,
+ WID_SHORT = 1,
+ WID_INT = 2,
+ WID_STR = 3,
+ WID_ADR = 4,
+ WID_BIN = 5,
+ WID_IP = 6,
+ WID_UNDEF = 7
+} WID_TYPE_T;
+#endif
+typedef struct
+{
+ NMI_Uint16 cfg_wid;
+ WID_TYPE_T cfg_type;
+ NMI_Sint8 *pu8Para;
+} cfg_param_t;
+
+
+
+typedef enum
+{
+ HOST_IF_IDLE = 0,
+ HOST_IF_SCANNING = 1,
+ HOST_IF_WAITING_CONN_REQ = 2,
+ HOST_IF_WAITING_CONN_RESP = 3,
+ HOST_IF_CONNECTED = 4,
+ HOST_IF_FORCE_32BIT = 0xFFFFFFFF
+}tenuHostIFstate;
+
+typedef struct _tstrHostIFpmkid
+{
+ NMI_Uint8 bssid[ETH_ALEN];
+ NMI_Uint8 pmkid[PMKID_LEN];
+}tstrHostIFpmkid;
+
+typedef struct _tstrHostIFpmkidAttr
+{
+ NMI_Uint8 numpmkid;
+ tstrHostIFpmkid pmkidlist[NMI_MAX_NUM_PMKIDS];
+}tstrHostIFpmkidAttr;
+#if 0
+/* Scan type parameter for scan request */
+typedef enum
+{
+ PASSIVE_SCAN = 0,
+ ACTIVE_SCAN = 1,
+ NUM_SCANTYPE
+} tenuScanType;
+
+typedef enum {SITE_SURVEY_1CH = 0,
+ SITE_SURVEY_ALL_CH = 1,
+ SITE_SURVEY_OFF = 2
+} SITE_SURVEY_T;
+#endif
+typedef enum{AUTORATE = 0,
+ MBPS_1 = 1,
+ MBPS_2 = 2,
+ MBPS_5_5 = 5,
+ MBPS_11 = 11,
+ MBPS_6 = 6,
+ MBPS_9 = 9,
+ MBPS_12 = 12,
+ MBPS_18 = 18,
+ MBPS_24 = 24,
+ MBPS_36 = 36,
+ MBPS_48 = 48,
+ MBPS_54 = 54
+
+}CURRENT_TX_RATE_T;
+
+typedef struct
+{
+ NMI_Uint32 u32SetCfgFlag;
+ NMI_Uint8 ht_enable;
+ NMI_Uint8 bss_type;
+ NMI_Uint8 auth_type;
+ NMI_Uint16 auth_timeout;
+ NMI_Uint8 power_mgmt_mode;
+ NMI_Uint16 short_retry_limit;
+ NMI_Uint16 long_retry_limit;
+ NMI_Uint16 frag_threshold;
+ NMI_Uint16 rts_threshold;
+ NMI_Uint16 preamble_type;
+ NMI_Uint8 short_slot_allowed;
+ NMI_Uint8 txop_prot_disabled;
+ NMI_Uint16 beacon_interval;
+ NMI_Uint16 dtim_period;
+ SITE_SURVEY_T site_survey_enabled;
+ NMI_Uint16 site_survey_scan_time;
+ NMI_Uint8 scan_source;
+ NMI_Uint16 active_scan_time;
+ NMI_Uint16 passive_scan_time;
+ CURRENT_TX_RATE_T curr_tx_rate;
+
+}tstrCfgParamVal;
+
+typedef enum {
+ RETRY_SHORT = 1 << 0,
+ RETRY_LONG = 1 << 1,
+ FRAG_THRESHOLD = 1 << 2,
+ RTS_THRESHOLD = 1 << 3,
+ BSS_TYPE = 1 << 4,
+ AUTH_TYPE = 1 << 5,
+ AUTHEN_TIMEOUT = 1 << 6,
+ POWER_MANAGEMENT = 1 << 7,
+ PREAMBLE = 1 << 8,
+ SHORT_SLOT_ALLOWED = 1 << 9,
+ TXOP_PROT_DISABLE = 1 << 10,
+ BEACON_INTERVAL = 1 << 11,
+ DTIM_PERIOD = 1 << 12,
+ SITE_SURVEY = 1 << 13,
+ SITE_SURVEY_SCAN_TIME = 1 << 14,
+ ACTIVE_SCANTIME = 1 << 15,
+ PASSIVE_SCANTIME = 1 << 16,
+ CURRENT_TX_RATE = 1 << 17,
+ HT_ENABLE = 1 <<18,
+}tenuCfgParam;
+
+typedef struct
+{
+ NMI_Uint8 au8bssid[6];
+}tstrFoundNetworkInfo;
+
+typedef enum {SCAN_EVENT_NETWORK_FOUND = 0,
+SCAN_EVENT_DONE = 1,
+SCAN_EVENT_ABORTED = 2,
+SCAN_EVENT_FORCE_32BIT = 0xFFFFFFFF
+}tenuScanEvent;
+
+typedef enum
+{
+ CONN_DISCONN_EVENT_CONN_RESP = 0,
+ CONN_DISCONN_EVENT_DISCONN_NOTIF = 1,
+ CONN_DISCONN_EVENT_FORCE_32BIT = 0xFFFFFFFF
+}tenuConnDisconnEvent;
+
+typedef enum
+{
+ WEP,
+ WPARxGtk,
+ //WPATxGtk,
+ WPAPtk,
+ PMKSA,
+}tenuKeyType;
+
+
+/*Scan callBack function definition*/
+typedef void(*tNMIpfScanResult)(tenuScanEvent, tstrNetworkInfo*, void*);
+
+/*Connect callBack function definition*/
+typedef void(*tNMIpfConnectResult)(tenuConnDisconnEvent,
+ tstrConnectInfo*,
+ NMI_Uint8,
+ tstrDisconnectNotifInfo*,
+ void*);
+
+//typedef NMI_Uint32 NMI_WFIDrvHandle;
+typedef struct
+{
+ NMI_Sint32 s32Dummy;
+}
+*NMI_WFIDrvHandle;
+
+/*!
+* @struct tstrRcvdNetworkInfo
+* @brief Structure to hold Received Asynchronous Network info
+* @details
+* @todo
+* @sa
+* @author Mostafa Abu Bakr
+* @date 25 March 2012
+* @version 1.0
+*/
+typedef struct _tstrRcvdNetworkInfo
+{
+ NMI_Uint8* pu8Buffer;
+ NMI_Uint32 u32Length;
+} tstrRcvdNetworkInfo;
+
+/*BugID_4156*/
+typedef struct _tstrHiddenNetworkInfo
+{
+ NMI_Uint8 *pu8ssid;
+ NMI_Uint8 u8ssidlen;
+
+}tstrHiddenNetworkInfo;
+
+typedef struct _tstrHiddenNetwork
+{
+ //MAX_SSID_LEN
+ tstrHiddenNetworkInfo *pstrHiddenNetworkInfo;
+ NMI_Uint8 u8ssidnum;
+
+} tstrHiddenNetwork;
+
+typedef struct
+{
+ /* Scan user call back function */
+ tNMIpfScanResult pfUserScanResult;
+
+ /* User specific parameter to be delivered through the Scan User Callback function */
+ void* u32UserScanPvoid;
+
+ NMI_Uint32 u32RcvdChCount;
+ tstrFoundNetworkInfo astrFoundNetworkInfo[MAX_NUM_SCANNED_NETWORKS];
+}tstrNMI_UsrScanReq;
+
+typedef struct
+{
+ NMI_Uint8* pu8bssid;
+ NMI_Uint8* pu8ssid;
+ NMI_Uint8 u8security;
+ AUTHTYPE_T tenuAuth_type;
+ size_t ssidLen;
+ NMI_Uint8* pu8ConnReqIEs;
+ size_t ConnReqIEsLen;
+ /* Connect user call back function */
+ tNMIpfConnectResult pfUserConnectResult;
+ NMI_Bool IsHTCapable;
+ /* User specific parameter to be delivered through the Connect User Callback function */
+ void* u32UserConnectPvoid;
+}tstrNMI_UsrConnReq;
+
+typedef struct
+{
+ /* Scan user structure */
+ tstrNMI_UsrScanReq strNMI_UsrScanReq;
+
+ /* Connect User structure */
+ tstrNMI_UsrConnReq strNMI_UsrConnReq;
+
+ tenuHostIFstate enuHostIFstate;
+
+ //NMI_Bool bPendingConnRequest;
+
+ #ifndef CONNECT_DIRECT
+ NMI_Uint32 u32SurveyResultsCount;
+ wid_site_survey_reslts_s astrSurveyResults[MAX_NUM_SCANNED_NETWORKS];
+ #endif
+
+ NMI_Uint8 au8AssociatedBSSID[ETH_ALEN];
+ tstrCfgParamVal strCfgValues;
+}tstrNMI_WFIDrv;
+
+/*!
+* @enum tenuNMI_StaFlag
+* @brief Used to decode the station flag set and mask in tstrNMI_AddStaParam
+* @details
+* @todo
+* @sa tstrNMI_AddStaParam, enum nl80211_sta_flags
+* @author Enumeraion's creator
+* @date 12 July 2012
+* @version 1.0 Description
+*/
+
+typedef enum
+{
+ NMI_STA_FLAG_INVALID = 0,
+ NMI_STA_FLAG_AUTHORIZED, /*!< station is authorized (802.1X)*/
+ NMI_STA_FLAG_SHORT_PREAMBLE, /*!< station is capable of receiving frames with short barker preamble*/
+ NMI_STA_FLAG_WME, /*!< station is WME/QoS capable*/
+ NMI_STA_FLAG_MFP, /*!< station uses management frame protection*/
+ NMI_STA_FLAG_AUTHENTICATED /*!< station is authenticated*/
+}tenuNMI_StaFlag;
+
+typedef struct
+{
+ NMI_Uint8 au8BSSID[ETH_ALEN];
+ NMI_Uint16 u16AssocID;
+ NMI_Uint8 u8NumRates;
+ NMI_Uint8* pu8Rates;
+ NMI_Bool bIsHTSupported;
+ NMI_Uint16 u16HTCapInfo;
+ NMI_Uint8 u8AmpduParams;
+ NMI_Uint8 au8SuppMCsSet[16];
+ NMI_Uint16 u16HTExtParams;
+ NMI_Uint32 u32TxBeamformingCap;
+ NMI_Uint8 u8ASELCap;
+ NMI_Uint16 u16FlagsMask; /*<! Determines which of u16FlagsSet were changed>*/
+ NMI_Uint16 u16FlagsSet; /*<! Decoded according to tenuNMI_StaFlag */
+}tstrNMI_AddStaParam;
+
+//extern void CfgDisconnected(void* pUserVoid, NMI_Uint16 u16reason, NMI_Uint8 * ie, size_t ie_len);
+
+/*****************************************************************************/
+/* */
+/* Host Interface API */
+/* */
+/*****************************************************************************/
+
+/**
+* @brief removes wpa/wpa2 keys
+* @details only in BSS STA mode if External Supplicant support is enabled.
+ removes all WPA/WPA2 station key entries from MAC hardware.
+* @param[in,out] handle to the wifi driver
+* @param[in] 6 bytes of Station Adress in the station entry table
+* @return Error code indicating success/failure
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+NMI_Sint32 host_int_remove_key(NMI_WFIDrvHandle hWFIDrv,const NMI_Uint8* pu8StaAddress);
+/**
+* @brief removes WEP key
+* @details valid only in BSS STA mode if External Supplicant support is enabled.
+ remove a WEP key entry from MAC HW.
+ The BSS Station automatically finds the index of the entry using its
+ BSS ID and removes that entry from the MAC hardware.
+* @param[in,out] handle to the wifi driver
+* @param[in] 6 bytes of Station Adress in the station entry table
+* @return Error code indicating success/failure
+* @note NO need for the STA add since it is not used for processing
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+NMI_Sint32 host_int_remove_wep_key(NMI_WFIDrvHandle hWFIDrv,NMI_Uint8 u8Index);
+/**
+* @brief sets WEP deafault key
+* @details Sets the index of the WEP encryption key in use,
+ in the key table
+* @param[in,out] handle to the wifi driver
+* @param[in] key index ( 0, 1, 2, 3)
+* @return Error code indicating success/failure
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+NMI_Sint32 host_int_set_WEPDefaultKeyID(NMI_WFIDrvHandle hWFIDrv,NMI_Uint8 u8Index);
+
+/**
+* @brief sets WEP deafault key
+* @details valid only in BSS STA mode if External Supplicant support is enabled.
+ sets WEP key entry into MAC hardware when it receives the
+ corresponding request from NDIS.
+* @param[in,out] handle to the wifi driver
+* @param[in] message containing WEP Key in the following format
+ |---------------------------------------|
+ |Key ID Value | Key Length | Key |
+ |-------------|------------|------------|
+ | 1byte | 1byte | Key Length |
+ |---------------------------------------|
+
+* @return Error code indicating success/failure
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+NMI_Sint32 host_int_add_wep_key_bss_sta(NMI_WFIDrvHandle hWFIDrv, const NMI_Uint8* pu8WepKey, NMI_Uint8 u8WepKeylen, NMI_Uint8 u8Keyidx);
+/**
+* @brief host_int_add_wep_key_bss_ap
+* @details valid only in AP mode if External Supplicant support is enabled.
+ sets WEP key entry into MAC hardware when it receives the
+ corresponding request from NDIS.
+* @param[in,out] handle to the wifi driver
+
+
+* @return Error code indicating success/failure
+* @note
+* @author mdaftedar
+* @date 28 Feb 2013
+* @version 1.0
+*/
+NMI_Sint32 host_int_add_wep_key_bss_ap(NMI_WFIDrvHandle hWFIDrv, const NMI_Uint8* pu8WepKey, NMI_Uint8 u8WepKeylen, NMI_Uint8 u8Keyidx,NMI_Uint8 u8mode, AUTHTYPE_T tenuAuth_type);
+
+/**
+* @brief adds ptk Key
+* @details
+* @param[in,out] handle to the wifi driver
+* @param[in] message containing PTK Key in the following format
+|-------------------------------------------------------------------------|
+|Sta Adress | Key Length | Temporal Key | Rx Michael Key |Tx Michael Key |
+|-----------|------------|---------------|----------------|---------------|
+| 6 bytes | 1byte | 16 bytes | 8 bytes | 8 bytes |
+|-------------------------------------------------------------------------|
+* @return Error code indicating success/failure
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+NMI_Sint32 host_int_add_ptk(NMI_WFIDrvHandle hWFIDrv,NMI_Uint8* pu8Ptk,NMI_Uint8 u8PtkKeylen,
+ const NMI_Uint8* mac_addr,NMI_Uint8* pu8RxMic,NMI_Uint8* pu8TxMic,NMI_Uint8 mode,NMI_Uint8 u8Ciphermode,NMI_Uint8 u8Idx);
+
+/**
+* @brief host_int_get_inactive_time
+* @details
+* @param[in,out] handle to the wifi driver
+* @param[in] message containing inactive time
+
+* @return Error code indicating success/failure
+* @note
+* @author mdaftedar
+* @date 15 April 2013
+* @version 1.0
+*/
+NMI_Sint32 host_int_get_inactive_time(NMI_WFIDrvHandle hWFIDrv,NMI_Uint8 * mac,NMI_Uint32* pu32InactiveTime);
+
+/**
+* @brief adds Rx GTk Key
+* @details
+* @param[in,out] handle to the wifi driver
+* @param[in] message containing Rx GTK Key in the following format
+|----------------------------------------------------------------------------|
+|Sta Address | Key RSC | KeyID | Key Length | Temporal Key | Rx Michael Key |
+|------------|---------|-------|------------|---------------|----------------|
+| 6 bytes | 8 byte |1 byte | 1 byte | 16 bytes | 8 bytes |
+|----------------------------------------------------------------------------|
+* @return Error code indicating success/failure
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+ NMI_Sint32 host_int_add_rx_gtk(NMI_WFIDrvHandle hWFIDrv, NMI_Uint8* pu8RxGtk,NMI_Uint8 u8GtkKeylen,
+ NMI_Uint8 u8KeyIdx,NMI_Uint32 u32KeyRSClen, NMI_Uint8* KeyRSC,
+ NMI_Uint8* pu8RxMic,NMI_Uint8* pu8TxMic,NMI_Uint8 mode,NMI_Uint8 u8Ciphermode);
+
+
+/**
+* @brief adds Tx GTk Key
+* @details
+* @param[in,out] handle to the wifi driver
+* @param[in] message containing Tx GTK Key in the following format
+ |----------------------------------------------------|
+ | KeyID | Key Length | Temporal Key | Tx Michael Key |
+ |-------|------------|--------------|----------------|
+ |1 byte | 1 byte | 16 bytes | 8 bytes |
+ |----------------------------------------------------|
+* @return Error code indicating success/failure
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+NMI_Sint32 host_int_add_tx_gtk(NMI_WFIDrvHandle hWFIDrv,NMI_Uint8 u8KeyLen,NMI_Uint8* pu8TxGtk,NMI_Uint8 u8KeyIdx);
+
+/**
+* @brief caches the pmkid
+* @details valid only in BSS STA mode if External Supplicant
+ support is enabled. This Function sets the PMKID in firmware
+ when host drivr receives the corresponding request from NDIS.
+ The firmware then includes theset PMKID in the appropriate
+ management frames
+* @param[in,out] handle to the wifi driver
+* @param[in] message containing PMKID Info in the following format
+|-----------------------------------------------------------------|
+|NumEntries | BSSID[1] | PMKID[1] | ... | BSSID[K] | PMKID[K] |
+|-----------|------------|----------|-------|----------|----------|
+| 1 | 6 | 16 | ... | 6 | 16 |
+|-----------------------------------------------------------------|
+* @return Error code indicating success/failure
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+
+NMI_Sint32 host_int_set_pmkid_info(NMI_WFIDrvHandle hWFIDrv, tstrHostIFpmkidAttr* pu8PmkidInfoArray);
+/**
+* @brief gets the cached the pmkid info
+* @details valid only in BSS STA mode if External Supplicant
+ support is enabled. This Function sets the PMKID in firmware
+ when host drivr receives the corresponding request from NDIS.
+ The firmware then includes theset PMKID in the appropriate
+ management frames
+* @param[in,out] handle to the wifi driver,
+
+ message containing PMKID Info in the following format
+ |-----------------------------------------------------------------|
+ |NumEntries | BSSID[1] | PMKID[1] | ... | BSSID[K] | PMKID[K] |
+ |-----------|------------|----------|-------|----------|----------|
+ | 1 | 6 | 16 | ... | 6 | 16 |
+ |-----------------------------------------------------------------|
+* @param[in]
+* @return Error code indicating success/failure
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+
+NMI_Sint32 host_int_get_pmkid_info(NMI_WFIDrvHandle hWFIDrv,NMI_Uint8* pu8PmkidInfoArray,
+ NMI_Uint32 u32PmkidInfoLen);
+
+/**
+* @brief sets the pass phrase
+* @details AP/STA mode. This function gives the pass phrase used to
+ generate the Pre-Shared Key when WPA/WPA2 is enabled
+ The length of the field can vary from 8 to 64 bytes,
+ the lower layer should get the
+* @param[in,out] handle to the wifi driver,
+* @param[in] String containing PSK
+* @return Error code indicating success/failure
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+NMI_Sint32 host_int_set_RSNAConfigPSKPassPhrase(NMI_WFIDrvHandle hWFIDrv, NMI_Uint8* pu8PassPhrase,
+ NMI_Uint8 u8Psklength);
+/**
+* @brief gets the pass phrase
+* @details AP/STA mode. This function gets the pass phrase used to
+ generate the Pre-Shared Key when WPA/WPA2 is enabled
+ The length of the field can vary from 8 to 64 bytes,
+ the lower layer should get the
+* @param[in,out] handle to the wifi driver,
+ String containing PSK
+* @return Error code indicating success/failure
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+NMI_Sint32 host_int_get_RSNAConfigPSKPassPhrase(NMI_WFIDrvHandle hWFIDrv,
+ NMI_Uint8* pu8PassPhrase, NMI_Uint8 u8Psklength);
+
+/**
+* @brief gets mac address
+* @details
+* @param[in,out] handle to the wifi driver,
+
+* @return Error code indicating success/failure
+* @note
+* @author mdaftedar
+* @date 19 April 2012
+* @version 1.0
+*/
+NMI_Sint32 host_int_get_MacAddress(NMI_WFIDrvHandle hWFIDrv,NMI_Uint8* pu8MacAddress);
+
+/**
+* @brief sets mac address
+* @details
+* @param[in,out] handle to the wifi driver,
+
+* @return Error code indicating success/failure
+* @note
+* @author mabubakr
+* @date 16 July 2012
+* @version 1.0
+*/
+NMI_Sint32 host_int_set_MacAddress(NMI_WFIDrvHandle hWFIDrv,NMI_Uint8* pu8MacAddress);
+
+/**
+* @brief gets the site survey results
+* @details
+* @param[in,out] handle to the wifi driver,
+ Message containing site survey results in the
+ following formate
+|---------------------------------------------------|
+| MsgLength | fragNo. | MsgBodyLength | MsgBody |
+|-----------|-----------|---------------|-----------|
+| 1 | 1 | 1 | 1 |
+----------------------------------------- | ----------------
+ |
+ |---------------------------------------|
+ | Network1 | Netweork2 | ... | Network5 |
+ |---------------------------------------|
+ | 44 | 44 | ... | 44 |
+-------------------------- | ---------------------------------------
+ |
+|---------------------------------------------------------------------|
+| SSID | BSS Type | Channel | Security Status| BSSID | RSSI |Reserved |
+|------|----------|---------|----------------|-------|------|---------|
+| 33 | 1 | 1 | 1 | 6 | 1 | 1 |
+|---------------------------------------------------------------------|
+* @return Error code indicating success/failure
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+#ifndef CONNECT_DIRECT
+NMI_Sint32 host_int_get_site_survey_results(NMI_WFIDrvHandle hWFIDrv,
+ NMI_Uint8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZE],
+ NMI_Uint32 u32MaxSiteSrvyFragLen);
+#endif
+
+/**
+* @brief sets a start scan request
+* @details
+* @param[in,out] handle to the wifi driver,
+* @param[in] Scan Source one of the following values
+ DEFAULT_SCAN 0
+ USER_SCAN BIT0
+ OBSS_PERIODIC_SCAN BIT1
+ OBSS_ONETIME_SCAN BIT2
+* @return Error code indicating success/failure
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+
+NMI_Sint32 host_int_set_start_scan_req(NMI_WFIDrvHandle hWFIDrv,NMI_Uint8 scanSource);
+/**
+* @brief gets scan source of the last scan
+* @details
+* @param[in,out] handle to the wifi driver,
+ Scan Source one of the following values
+ DEFAULT_SCAN 0
+ USER_SCAN BIT0
+ OBSS_PERIODIC_SCAN BIT1
+ OBSS_ONETIME_SCAN BIT2
+* @return Error code indicating success/failure
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+ NMI_Sint32 host_int_get_start_scan_req(NMI_WFIDrvHandle hWFIDrv,NMI_Uint8* pu8ScanSource);
+
+/**
+* @brief sets a join request
+* @details
+* @param[in,out] handle to the wifi driver,
+* @param[in] Index of the bss descriptor
+* @return Error code indicating success/failure
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+
+NMI_Sint32 host_int_set_join_req(NMI_WFIDrvHandle hWFIDrv, NMI_Uint8* pu8bssid,
+ NMI_Uint8* pu8ssid, size_t ssidLen,
+ const NMI_Uint8* pu8IEs, size_t IEsLen,
+ tNMIpfConnectResult pfConnectResult, void* pvUserArg,
+ NMI_Uint8 u8security, AUTHTYPE_T tenuAuth_type,
+ NMI_Uint8 u8channel);
+
+/**
+* @brief disconnects from the currently associated network
+* @details
+* @param[in,out] handle to the wifi driver,
+* @param[in] Reason Code of the Disconnection
+* @return Error code indicating success/failure
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+NMI_Sint32 host_int_disconnect(NMI_WFIDrvHandle hWFIDrv, NMI_Uint16 u16ReasonCode);
+
+/**
+* @brief disconnects a sta
+* @details
+* @param[in,out] handle to the wifi driver,
+* @param[in] Association Id of the station to be disconnected
+* @return Error code indicating success/failure
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+NMI_Sint32 host_int_disconnect_station(NMI_WFIDrvHandle hWFIDrv,NMI_Uint8 assoc_id);
+/**
+* @brief gets a Association request info
+* @details
+* @param[in,out] handle to the wifi driver,
+ Message containg assoc. req info in the following format
+------------------------------------------------------------------------
+| Management Frame Format |
+|-------------------------------------------------------------------|
+|Frame Control|Duration|DA|SA|BSSID|Sequence Control|Frame Body|FCS |
+|-------------|--------|--|--|-----|----------------|----------|----|
+| 2 |2 |6 |6 |6 | 2 |0 - 2312 | 4 |
+|-------------------------------------------------------------------|
+| |
+| Association Request Frame - Frame Body |
+|-------------------------------------------------------------------|
+| Capability Information | Listen Interval | SSID | Supported Rates |
+|------------------------|-----------------|------|-----------------|
+| 2 | 2 | 2-34 | 3-10 |
+| ---------------------------------------------------------------------
+* @return Error code indicating success/failure
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+
+NMI_Sint32 host_int_get_assoc_req_info(NMI_WFIDrvHandle hWFIDrv, NMI_Uint8* pu8AssocReqInfo,
+ NMI_Uint32 u32AssocReqInfoLen);
+/**
+* @brief gets a Association Response info
+* @details
+* @param[in,out] handle to the wifi driver,
+ Message containg assoc. resp info
+* @return Error code indicating success/failure
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+
+NMI_Sint32 host_int_get_assoc_res_info(NMI_WFIDrvHandle hWFIDrv, NMI_Uint8* pu8AssocRespInfo,
+ NMI_Uint32 u32MaxAssocRespInfoLen, NMI_Uint32* pu32RcvdAssocRespInfoLen);
+/**
+* @brief gets a Association Response info
+* @details Valid only in STA mode. This function gives the RSSI
+ values observed in all the channels at the time of scanning.
+ The length of the field is 1 greater that the total number of
+ channels supported. Byte 0 contains the number of channels while
+ each of Byte N contains the observed RSSI value for the channel index N.
+* @param[in,out] handle to the wifi driver,
+ array of scanned channels' RSSI
+* @return Error code indicating success/failure
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+NMI_Sint32 host_int_get_rx_power_level(NMI_WFIDrvHandle hWFIDrv, NMI_Uint8* pu8RxPowerLevel,
+ NMI_Uint32 u32RxPowerLevelLen);
+
+/**
+* @brief sets a channel
+* @details
+* @param[in,out] handle to the wifi driver,
+* @param[in] Index of the channel to be set
+|-------------------------------------------------------------------|
+| CHANNEL1 CHANNEL2 .... CHANNEL14 |
+| Input: 1 2 14 |
+|-------------------------------------------------------------------|
+* @return Error code indicating success/failure
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+NMI_Sint32 host_int_set_mac_chnl_num(NMI_WFIDrvHandle hWFIDrv,NMI_Uint8 u8ChNum);
+
+/**
+* @brief gets the current channel index
+* @details
+* @param[in,out] handle to the wifi driver,
+ current channel index
+|-----------------------------------------------------------------------|
+| CHANNEL1 CHANNEL2 .... CHANNEL14 |
+| Input: 1 2 14 |
+|-----------------------------------------------------------------------|
+* @return Error code indicating success/failure
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+NMI_Sint32 host_int_get_host_chnl_num(NMI_WFIDrvHandle hWFIDrv, NMI_Uint8* pu8ChNo);
+/**
+* @brief gets the sta rssi
+* @details gets the currently maintained RSSI value for the station.
+ The received signal strength value in dB.
+ The range of valid values is -128 to 0.
+* @param[in,out] handle to the wifi driver,
+ rssi value in dB
+* @return Error code indicating success/failure
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+NMI_Sint32 host_int_get_rssi(NMI_WFIDrvHandle hWFIDrv, NMI_Sint8* ps8Rssi);
+
+/**
+* @brief scans a set of channels
+* @details
+* @param[in,out] handle to the wifi driver,
+* @param[in] Scan source
+ Scan Type PASSIVE_SCAN = 0,
+ ACTIVE_SCAN = 1
+ Channels Array
+ Channels Array length
+ Scan Callback function
+ User Argument to be delivered back through the Scan Cllback function
+* @return Error code indicating success/failure
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+NMI_Sint32 host_int_scan(NMI_WFIDrvHandle hWFIDrv, NMI_Uint8 u8ScanSource,
+ NMI_Uint8 u8ScanType, NMI_Uint8* pu8ChnlFreqList,
+ NMI_Uint8 u8ChnlListLen, const NMI_Uint8* pu8IEs,
+ size_t IEsLen, tNMIpfScanResult ScanResult,
+ void* pvUserArg,tstrHiddenNetwork *pstrHiddenNetwork);
+/**
+* @brief sets configuration wids values
+* @details
+* @param[in,out] handle to the wifi driver,
+* @param[in] WID, WID value
+* @return Error code indicating success/failure
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+NMI_Sint32 hif_set_cfg(NMI_WFIDrvHandle hWFIDrv, tstrCfgParamVal * pstrCfgParamVal);
+
+/**
+* @brief gets configuration wids values
+* @details
+* @param[in,out] handle to the wifi driver,
+ WID value
+* @param[in] WID,
+* @return Error code indicating success/failure
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+NMI_Sint32 hif_get_cfg(NMI_WFIDrvHandle hWFIDrv,NMI_Uint16 u16WID,NMI_Uint16* pu16WID_Value);
+/*****************************************************************************/
+/* Notification Functions */
+/*****************************************************************************/
+/**
+* @brief notifies host with join and leave requests
+* @details This function prepares an Information frame having the
+ information about a joining/leaving station.
+* @param[in,out] handle to the wifi driver,
+* @param[in] 6 byte Sta Adress
+ Join or leave flag:
+ Join = 1,
+ Leave =0
+* @return Error code indicating success/failure
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+void host_int_send_join_leave_info_to_host
+ (NMI_Uint16 assocId, NMI_Uint8* stationAddr, NMI_Bool joining);
+
+/**
+* @brief notifies host with stations found in scan
+* @details sends the beacon/probe response from scan
+* @param[in,out] handle to the wifi driver,
+* @param[in] Sta Address,
+ Frame length,
+ Rssi of the Station found
+* @return Error code indicating success/failure
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+void host_int_send_network_info_to_host
+ (NMI_Uint8 *macStartAddress,NMI_Uint16 u16RxFrameLen, NMI_Sint8 s8Rssi);
+
+/**
+* @brief host interface initialization function
+* @details
+* @param[in,out] handle to the wifi driver,
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+NMI_Sint32 host_int_init(NMI_WFIDrvHandle* phWFIDrv);
+
+/**
+* @brief host interface initialization function
+* @details
+* @param[in,out] handle to the wifi driver,
+* @note
+* @author zsalah
+* @date 8 March 2012
+* @version 1.0
+*/
+NMI_Sint32 host_int_deinit(NMI_WFIDrvHandle hWFIDrv);
+
+
+/*!
+ * @fn NMI_Sint32 host_int_add_beacon(NMI_WFIDrvHandle hWFIDrv,NMI_Uint8 u8Index)
+ * @brief Sends a beacon to the firmware to be transmitted over the air
+ * @details
+ * @param[in,out] hWFIDrv handle to the wifi driver
+ * @param[in] u32Interval Beacon Interval. Period between two successive beacons on air
+ * @param[in] u32DTIMPeriod DTIM Period. Indicates how many Beacon frames
+ * (including the current frame) appear before the next DTIM
+ * @param[in] u32Headlen Length of the head buffer in bytes
+ * @param[in] pu8Head Pointer to the beacon's head buffer. Beacon's head
+ * is the part from the beacon's start till the TIM element, NOT including the TIM
+ * @param[in] u32Taillen Length of the tail buffer in bytes
+ * @param[in] pu8Tail Pointer to the beacon's tail buffer. Beacon's tail
+ * starts just after the TIM inormation element
+ * @return 0 for Success, error otherwise
+ * @todo
+ * @sa
+ * @author Adham Abozaeid
+ * @date 10 Julys 2012
+ * @version 1.0 Description
+
+ */
+NMI_Sint32 host_int_add_beacon(NMI_WFIDrvHandle hWFIDrv, NMI_Uint32 u32Interval,
+ NMI_Uint32 u32DTIMPeriod,
+ NMI_Uint32 u32HeadLen, NMI_Uint8* pu8Head,
+ NMI_Uint32 u32TailLen, NMI_Uint8* pu8tail);
+
+
+/*!
+ * @fn NMI_Sint32 host_int_del_beacon(NMI_WFIDrvHandle hWFIDrv)
+ * @brief Removes the beacon and stops tranmitting it over the air
+ * @details
+ * @param[in,out] hWFIDrv handle to the wifi driver
+ * @return 0 for Success, error otherwise
+ * @todo
+ * @sa
+ * @author Adham Abozaeid
+ * @date 10 Julys 2012
+ * @version 1.0 Description
+ */
+NMI_Sint32 host_int_del_beacon(NMI_WFIDrvHandle hWFIDrv);
+
+/*!
+ * @fn NMI_Sint32 host_int_add_station(NMI_WFIDrvHandle hWFIDrv, tstrNMI_AddStaParam strStaParams)
+ * @brief Notifies the firmware with a new associated stations
+ * @details
+ * @param[in,out] hWFIDrv handle to the wifi driver
+ * @param[in] pstrStaParams Station's parameters
+ * @return 0 for Success, error otherwise
+ * @todo
+ * @sa
+ * @author Adham Abozaeid
+ * @date 12 July 2012
+ * @version 1.0 Description
+ */
+NMI_Sint32 host_int_add_station(NMI_WFIDrvHandle hWFIDrv, tstrNMI_AddStaParam* pstrStaParams);
+
+
+/*!
+ * @fn NMI_Sint32 host_int_del_station(NMI_WFIDrvHandle hWFIDrv, NMI_Uint8* pu8MacAddr)
+ * @brief Notifies the firmware with a new deleted station
+ * @details
+ * @param[in,out] hWFIDrv handle to the wifi driver
+ * @param[in] pu8MacAddr Station's mac address
+ * @return 0 for Success, error otherwise
+ * @todo
+ * @sa
+ * @author Adham Abozaeid
+ * @date 15 July 2012
+ * @version 1.0 Description
+ */
+NMI_Sint32 host_int_del_station(NMI_WFIDrvHandle hWFIDrv, NMI_Uint8* pu8MacAddr);
+
+/*!
+ * @fn NMI_Sint32 host_int_edit_station(NMI_WFIDrvHandle hWFIDrv, tstrNMI_AddStaParam strStaParams)
+ * @brief Notifies the firmware with new parameters of an already associated station
+ * @details
+ * @param[in,out] hWFIDrv handle to the wifi driver
+ * @param[in] pstrStaParams Station's parameters
+ * @return 0 for Success, error otherwise
+ * @todo
+ * @sa
+ * @author Adham Abozaeid
+ * @date 15 July 2012
+ * @version 1.0 Description
+ */
+NMI_Sint32 host_int_edit_station(NMI_WFIDrvHandle hWFIDrv, tstrNMI_AddStaParam* pstrStaParams);
+
+/*!
+ * @fn NMI_Sint32 host_int_set_power_mgmt(NMI_WFIDrvHandle hWFIDrv, NMI_Bool bIsEnabled, NMI_Uint32 u32Timeout)
+ * @brief Set the power management mode to enabled or disabled
+ * @details
+ * @param[in,out] hWFIDrv handle to the wifi driver
+ * @param[in] bIsEnabled TRUE if enabled, FALSE otherwise
+ * @param[in] u32Timeout A timeout value of -1 allows the driver to adjust
+ * the dynamic ps timeout value
+ * @return 0 for Success, error otherwise
+ * @todo
+ * @sa
+ * @author Adham Abozaeid
+ * @date 24 November 2012
+ * @version 1.0 Description
+ */
+NMI_Sint32 host_int_set_power_mgmt(NMI_WFIDrvHandle hWFIDrv, NMI_Bool bIsEnabled, NMI_Uint32 u32Timeout);
+
+static NMI_Sint32 Handle_ScanDone(tenuScanEvent enuEvent);
+
+static int host_int_addBASession(char* pBSSID,char TID,short int BufferSize,
+ short int SessionTimeout);
+
+
+/*****************************************************************************/
+/* */
+/* EOF */
+/* */
+/*****************************************************************************/
+#endif
diff --git a/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/itypes.h b/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/itypes.h
new file mode 100755
index 00000000..c3600183
--- /dev/null
+++ b/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/itypes.h
@@ -0,0 +1,59 @@
+/*****************************************************************************/
+/* */
+/* Ittiam 802.11 MAC SOFTWARE */
+/* */
+/* ITTIAM SYSTEMS PVT LTD, BANGALORE */
+/* COPYRIGHT(C) 2005 */
+/* */
+/* This program is proprietary to Ittiam Systems Private Limited and */
+/* is protected under Indian Copyright Law as an unpublished work. Its use */
+/* and disclosure is limited by the terms and conditions of a license */
+/* agreement. It may not be copied or otherwise reproduced or disclosed to */
+/* persons outside the licensee's organization except in accordance with the*/
+/* terms and conditions of such an agreement. All copies and */
+/* reproductions shall be the property of Ittiam Systems Private Limited and*/
+/* must bear this notice in its entirety. */
+/* */
+/*****************************************************************************/
+
+/*****************************************************************************/
+/* */
+/* File Name : itypes.h */
+/* */
+/* Description : This file contains all the data type definitions for */
+/* MAC implementation. */
+/* */
+/* List of Functions : None */
+/* Issues / Problems : None */
+/* */
+/* Revision History : */
+/* */
+/* DD MM YYYY Author(s) Changes */
+/* 01 05 2005 Ittiam Draft */
+/* */
+/*****************************************************************************/
+
+#ifndef ITYPES_H
+#define ITYPES_H
+
+
+/*****************************************************************************/
+/* Data Types */
+/*****************************************************************************/
+
+typedef int WORD32;
+typedef short WORD16;
+typedef char WORD8;
+typedef unsigned int UWORD32;
+typedef unsigned short UWORD16;
+typedef unsigned char UWORD8;
+
+/*****************************************************************************/
+/* Enums */
+/*****************************************************************************/
+
+typedef enum {BFALSE = 0,
+ BTRUE = 1
+} BOOL_T;
+
+#endif /* ITYPES_H */
diff --git a/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/linux_wlan_common.h b/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/linux_wlan_common.h
new file mode 100755
index 00000000..4f49906d
--- /dev/null
+++ b/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/linux_wlan_common.h
@@ -0,0 +1,122 @@
+#ifndef LINUX_WLAN_COMMON_H
+#define LINUX_WLAN_COMMON_H
+
+enum debug_region{
+ Generic_debug = 0,
+ Hostapd_debug,
+ Hostinf_debug,
+ CFG80211_debug,
+ Coreconfig_debug,
+ Interrupt_debug,
+ TX_debug,
+ RX_debug,
+ Lock_debug,
+ Init_debug,
+ Bus_debug,
+ Mem_debug,
+ COMP = 0xFFFFFFFF,
+};
+
+#define GENERIC_DBG 1<<Generic_debug
+#define HOSTAPD_DBG 1<<Hostapd_debug
+#define HOSTINF_DBG 1<<Hostinf_debug
+#define CORECONFIG_DBG 1<<Coreconfig_debug
+#define CFG80211_DBG 1<<CFG80211_debug
+#define INT_DBG 1<<Interrupt_debug
+#define TX_DBG 1<<TX_debug
+#define RX_DBG 1<<RX_debug
+#define LOCK_DBG 1<<Lock_debug
+#define INIT_DBG 1<<Init_debug
+#define BUS_DBG 1<<Bus_debug
+#define MEM_DBG 1<<Mem_debug
+
+#if defined (NMC_DEBUGFS)
+extern void kmsgdump_write(char *fmt, ...);
+extern int nmc_debugfs_init(void);
+extern void nmc_debugfs_remove(void);
+
+extern atomic_t REGION;
+extern atomic_t DEBUG_LEVEL;
+
+#define DEBUG (1 << 0)
+#define INFO (1 << 1)
+#define WRN (1 << 2)
+#define ERR (1 << 3)
+
+#define PRINT_D(region,...) do{ if((atomic_read(&DEBUG_LEVEL) & DEBUG) && ((atomic_read(&REGION))&(region))){printk("DBG [%s: %d]",__FUNCTION__,__LINE__);\
+ kmsgdump_write("DBG [%s: %d]",__FUNCTION__,__LINE__);\
+ kmsgdump_write(__VA_ARGS__);\
+ printk(__VA_ARGS__);}}while(0)
+
+#define PRINT_INFO(region,...) do{ if((atomic_read(&DEBUG_LEVEL) & INFO) && ((atomic_read(&REGION))&(region))){printk("INFO [%s]",__FUNCTION__);\
+ kmsgdump_write("INFO [%s]",__FUNCTION__);\
+ kmsgdump_write(__VA_ARGS__);\
+ printk(__VA_ARGS__);}}while(0)
+
+#define PRINT_WRN(region,...) do{ if((atomic_read(&DEBUG_LEVEL) & WRN) && ((atomic_read(&REGION))&(region))){printk("WRN [%s: %d]",__FUNCTION__,__LINE__);\
+ kmsgdump_write("WRN [%s: %d]",__FUNCTION__,__LINE__);\
+ kmsgdump_write(__VA_ARGS__);\
+ printk(__VA_ARGS__);}}while(0)
+
+#define PRINT_ER(...) do{ if((atomic_read(&DEBUG_LEVEL) & ERR)) { \
+ printk("ERR [%s: %d]",__FUNCTION__,__LINE__);\
+ kmsgdump_write("ERR [%s: %d]",__FUNCTION__,__LINE__);\
+ kmsgdump_write(__VA_ARGS__);\
+ printk(__VA_ARGS__);}}while(0)
+
+#else
+
+#define REGION INIT_DBG|GENERIC_DBG|CFG80211_DBG
+
+#define DEBUG 1
+#define INFO 0
+#define WRN 0
+#define PRINT_D(region,...) do{ if(DEBUG == 1 && ((REGION)&(region))){printk("DBG [%s: %d]",__FUNCTION__,__LINE__);\
+ printk(__VA_ARGS__);}}while(0)
+
+#define PRINT_INFO(region,...) do{ if(INFO == 1 && ((REGION)&(region))){printk("INFO [%s]",__FUNCTION__);\
+ printk(__VA_ARGS__);}}while(0)
+
+#define PRINT_WRN(region,...) do{ if(WRN == 1 && ((REGION)&(region))){printk("WRN [%s: %d]",__FUNCTION__,__LINE__);\
+ printk(__VA_ARGS__);}}while(0)
+
+#define PRINT_ER(...) do{ printk("ERR [%s: %d]",__FUNCTION__,__LINE__);\
+ printk(__VA_ARGS__);}while(0)
+#endif
+
+#define FN_IN //PRINT_D(">>> \n")
+#define FN_OUT //PRINT_D("<<<\n")
+
+//#define LINUX_RX_SIZE (8*1024)
+#define LINUX_TX_SIZE (8*1024)
+
+#if defined (NM73131_0_BOARD)
+
+#define MODALIAS "nmc_spi"
+#define GPIO_NUM IRQ_NMC1000_GPIO
+
+#elif defined (BEAGLE_BOARD)
+ #define SPI_CHANNEL 4
+
+ #if SPI_CHANNEL == 4
+ #define MODALIAS "nmc_spi4"
+ #define GPIO_NUM 162
+ #else
+ #define MODALIAS "nmc_spi3"
+ #define GPIO_NUM 133
+ #endif
+#elif defined(PANDA_BOARD)
+ #define MODALIAS "NMI_SPI"
+ #define GPIO_NUM 139
+#elif defined(PLAT_WMS8304) // rachel
+ #define MODALIAS "nmi_spi"
+ #define GPIO_NUM 139
+#else
+ #define MODALIAS "NMI_SPI"
+ #define GPIO_NUM 139
+
+#endif
+
+
+void linux_wlan_enable_irq(void);
+#endif
diff --git a/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/nmi_type.h b/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/nmi_type.h
new file mode 100755
index 00000000..b04901b5
--- /dev/null
+++ b/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/nmi_type.h
@@ -0,0 +1,34 @@
+////////////////////////////////////////////////////////////////////////////
+//
+// Copyright (c) Newport Media Inc. All rights reserved.
+//
+// Module Name: nmi_type.h
+//
+//
+//////////////////////////////////////////////////////////////////////////////
+#ifndef NMI_TYPE_H
+#define NMI_TYPE_H
+
+/********************************************
+
+ Type Defines
+
+********************************************/
+#ifdef WIN32
+typedef char int8_t;
+typedef short int16_t;
+typedef long int32_t;
+typedef unsigned char uint8_t;
+typedef unsigned short uint16_t;
+typedef unsigned long uint32_t;
+#else
+#ifdef _linux_
+/*typedef unsigned char uint8_t;
+typedef unsigned short uint16_t;
+typedef unsigned long uint32_t;*/
+#include <stdint.h>
+#else
+#include "NMI_OSWrapper.h"
+#endif
+#endif
+#endif
diff --git a/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/nmi_wlan.h b/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/nmi_wlan.h
new file mode 100755
index 00000000..ee54275f
--- /dev/null
+++ b/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/nmi_wlan.h
@@ -0,0 +1,335 @@
+#ifndef NMI_WLAN_H
+#define NMI_WLAN_H
+
+#include "nmi_type.h"
+
+
+#define ISNMC1000(id) (((id & 0xfffff000) == 0x100000) ? 1 : 0)
+
+/**
+ DMA_VER_1: Old DMA interface introduced since A0. It exists in all
+ later versions and all versions are backward compatible with this interface.
+**/
+#define DMA_VER_1 (1)
+/**
+ DMA_VER_21: DMA interface introduced in D0/E0 versions and later. It uses
+ fewer number of registers to setup the TX/RX DMA and makes used of SDIO
+ CMD52 mapped registers and SPI internal registers for faster SDIO and SPI
+ DMAs respectively.
+**/
+#define DMA_VER_2 (2)
+
+#ifdef USE_DMA_VER_1
+#define DMA_VER DMA_VER_1
+#else
+#define DMA_VER DMA_VER_2
+#endif
+
+
+/********************************************
+
+ Mac eth header length
+
+********************************************/
+
+#define MAX_MAC_HDR_LEN 26 //QOS_MAC_HDR_LEN
+#define SUB_MSDU_HEADER_LENGTH 14
+#define SNAP_HDR_LEN 8
+#define ETHERNET_HDR_LEN 14
+#define WORD_ALIGNMENT_PAD 0
+
+#define ETH_ETHERNET_HDR_OFFSET (MAX_MAC_HDR_LEN + SUB_MSDU_HEADER_LENGTH + \
+ SNAP_HDR_LEN - ETHERNET_HDR_LEN + WORD_ALIGNMENT_PAD)
+
+/*Bug3959: transmitting mgmt frames received from host*/
+#define HOST_HDR_OFFSET 4
+#define ETHERNET_HDR_LEN 14
+#define IP_HDR_LEN 20
+#define IP_HDR_OFFSET ETHERNET_HDR_LEN
+#define UDP_HDR_OFFSET (IP_HDR_LEN + IP_HDR_OFFSET)
+#define UDP_HDR_LEN 8
+#define UDP_DATA_OFFSET (UDP_HDR_OFFSET + UDP_HDR_LEN)
+#define ETH_CONFIG_PKT_HDR_LEN UDP_DATA_OFFSET
+
+#define ETH_CONFIG_PKT_HDR_OFFSET (ETH_ETHERNET_HDR_OFFSET + \
+ ETH_CONFIG_PKT_HDR_LEN)
+
+/********************************************
+
+ Endian Conversion
+
+********************************************/
+
+#define BYTE_SWAP(val) ((((val) & 0x000000FF) << 24) + \
+ (((val) & 0x0000FF00) << 8) + \
+ (((val) & 0x00FF0000) >> 8) + \
+ (((val) & 0xFF000000) >> 24))
+
+/********************************************
+
+ Register Defines
+
+********************************************/
+#define NMI_PERIPH_REG_BASE 0x1000
+#define NMI_CHIPID (NMI_PERIPH_REG_BASE)
+#define NMI_GLB_RESET_0 (NMI_PERIPH_REG_BASE + 0x400)
+#define NMI_PIN_MUX_0 (NMI_PERIPH_REG_BASE + 0x408)
+#define NMI_HOST_TX_CTRL (NMI_PERIPH_REG_BASE + 0x6c)
+#define NMI_HOST_RX_CTRL_0 (NMI_PERIPH_REG_BASE + 0x70)
+#define NMI_HOST_RX_CTRL_1 (NMI_PERIPH_REG_BASE + 0x74)
+#define NMI_HOST_VMM_CTL (NMI_PERIPH_REG_BASE + 0x78)
+#define NMI_HOST_RX_CTRL (NMI_PERIPH_REG_BASE + 0x80)
+#define NMI_HOST_RX_EXTRA_SIZE (NMI_PERIPH_REG_BASE + 0x84)
+#define NMI_HOST_TX_CTRL_1 (NMI_PERIPH_REG_BASE + 0x88)
+#define NMI_MISC (NMI_PERIPH_REG_BASE+0x428)
+#define NMI_INTR_REG_BASE (NMI_PERIPH_REG_BASE+0xa00)
+#define NMI_INTR_ENABLE (NMI_INTR_REG_BASE)
+#define NMI_INTR2_ENABLE (NMI_INTR_REG_BASE+4)
+
+#define NMI_INTR_POLARITY (NMI_INTR_REG_BASE+0x10)
+#define NMI_INTR_TYPE (NMI_INTR_REG_BASE+0x20)
+#define NMI_INTR_CLEAR (NMI_INTR_REG_BASE+0x30)
+#define NMI_INTR_STATUS (NMI_INTR_REG_BASE+0x40)
+
+#define NMI_VMM_TBL_SIZE 64
+#define NMI_VMM_TX_TBL_BASE (0x150400)
+#define NMI_VMM_RX_TBL_BASE (0x150500)
+
+#define NMI_VMM_BASE 0x150000
+#define NMI_VMM_CORE_CTL (NMI_VMM_BASE)
+#define NMI_VMM_TBL_CTL (NMI_VMM_BASE+0x4)
+#define NMI_VMM_TBL_ENTRY (NMI_VMM_BASE+0x8)
+#define NMI_VMM_TBL0_SIZE (NMI_VMM_BASE+0xc)
+#define NMI_VMM_TO_HOST_SIZE (NMI_VMM_BASE+0x10)
+#define NMI_VMM_CORE_CFG (NMI_VMM_BASE+0x14)
+#define NMI_VMM_TBL_ACTIVE (NMI_VMM_BASE+040)
+#define NMI_VMM_TBL_STATUS (NMI_VMM_BASE+0x44)
+
+#define NMI_SPI_REG_BASE 0xe800
+#define NMI_SPI_CTL (NMI_SPI_REG_BASE)
+#define NMI_SPI_MASTER_DMA_ADDR (NMI_SPI_REG_BASE+0x4)
+#define NMI_SPI_MASTER_DMA_COUNT (NMI_SPI_REG_BASE+0x8)
+#define NMI_SPI_SLAVE_DMA_ADDR (NMI_SPI_REG_BASE+0xc)
+#define NMI_SPI_SLAVE_DMA_COUNT (NMI_SPI_REG_BASE+0x10)
+#define NMI_SPI_TX_MODE (NMI_SPI_REG_BASE+0x20)
+#define NMI_SPI_PROTOCOL_CONFIG (NMI_SPI_REG_BASE+0x24)
+#define NMI_SPI_INTR_CTL (NMI_SPI_REG_BASE+0x2c)
+
+#define NMI_SPI_PROTOCOL_OFFSET (NMI_SPI_PROTOCOL_CONFIG-NMI_SPI_REG_BASE)
+
+#define NMI_AHB_DATA_MEM_BASE 0x30000
+#define NMI_AHB_SHARE_MEM_BASE 0xd0000
+
+#define NMI_VMM_TBL_RX_SHADOW_BASE NMI_AHB_SHARE_MEM_BASE /* Bug 4477 fix */
+#define NMI_VMM_TBL_RX_SHADOW_SIZE (256) /* Bug 4477 fix */
+
+#define _NMI_INT_STATS_PRE_D0 0x1488
+#define _NMI_INT_STATS_D0_AND_LATER 0x149c
+
+/*
+ * General purpose register 1
+ * Bit 0: SDIO interrupt type: (This bit is ignored in case of SPI bus.)
+ * 1: SDIO uses a GPIO as interrupt.
+ * 0, SDIO native interrupt SDIO_DAT1 used.
+ * Bit 1: CLK type used
+ * 1: RTC clock is supplied externally from host
+ * 0: Use internal 80Mhz clock
+ */
+
+#define _NMI_GP_REG_1_PRE_D0 0x148c
+#define _NMI_GP_REG_1_D0_AND_LATER 0x14a0
+
+#define NMI_HAVE_SDIO_IRQ_GPIO (1 << 0)
+#define NMI_HAVE_RTC (1 << 1)
+#define NMI_HAVE_DMA_VER_2 (1 << 2)
+#define NMI_HAVE_VCO_14_SUPPLY (1 << 3)
+
+
+
+/********************************************
+
+ Wlan Defines
+
+********************************************/
+#define NMI_CFG_PKT 1
+#define NMI_NET_PKT 0
+/*Bug3959: transmitting mgmt frames received from host*/
+#ifdef NMI_AP_EXTERNAL_MLME
+#define NMI_MGMT_PKT 2
+#endif /*NMI_AP_EXTERNAL_MLME*/
+#define NMI_CFG_SET 1
+#define NMI_CFG_QUERY 0
+
+#define NMI_CFG_RSP 1
+#define NMI_CFG_RSP_STATUS 2
+#define NMI_CFG_RSP_SCAN 3
+
+#ifdef NMI_SDIO
+#define NMI_PLL_TO 4
+#else
+#define NMI_PLL_TO 2
+#endif
+
+/*******************************************/
+/* CA Interrupt flags. */
+/*******************************************/
+#define PLL_INT (1<<0)
+#define DATA_INT (1<<1)
+#define SLEEP_INT (1<<2)
+#define ABORT_INT (1<<31)
+
+#if DMA_VER == DMA_VER_2
+/*******************************************/
+/* E0 and later Interrupt flags. */
+/*******************************************/
+/*******************************************/
+/* E0 and later Interrupt flags. */
+/* IRQ Status word */
+/* 15:0 = DMA count in words. */
+/* 16: INT0 flag */
+/* 17: INT1 flag */
+/* 18: INT2 flag */
+/* 19: INT3 flag */
+/* 20: INT4 flag */
+/* 21: INT5 flag */
+/*******************************************/
+#define IRG_FLAGS_OFFSET 16
+#define IRQ_DMA_WD_CNT_MASK ((1ul << IRG_FLAGS_OFFSET) - 1)
+#define INT_0 (1<<(IRG_FLAGS_OFFSET))
+#define INT_1 (1<<(IRG_FLAGS_OFFSET+1))
+#define INT_2 (1<<(IRG_FLAGS_OFFSET+2))
+#define INT_3 (1<<(IRG_FLAGS_OFFSET+3))
+#define INT_4 (1<<(IRG_FLAGS_OFFSET+4))
+#define INT_5 (1<<(IRG_FLAGS_OFFSET+5))
+#define MAX_NUM_INT (6)
+
+/*******************************************/
+/* E0 and later Interrupt flags. */
+/* IRQ Clear word */
+/* 0: Clear INT0 */
+/* 1: Clear INT1 */
+/* 2: Clear INT2 */
+/* 3: Clear INT3 */
+/* 4: Clear INT4 */
+/* 5: Clear INT5 */
+/* 6: Select VMM table 1 */
+/* 7: Select VMM table 2 */
+/* 8: Enable VMM */
+/*******************************************/
+#define CLR_INT0 (1 << 0)
+#define CLR_INT1 (1 << 1)
+#define CLR_INT2 (1 << 2)
+#define CLR_INT3 (1 << 3)
+#define CLR_INT4 (1 << 4)
+#define CLR_INT5 (1 << 5)
+#define SEL_VMM_TBL0 (1 << 6)
+#define SEL_VMM_TBL1 (1 << 7)
+#define EN_VMM (1 << 8)
+
+#define DATA_INT_EXT INT_0
+#define PLL_INT_EXT INT_1
+#define SLEEP_INT_EXT INT_2
+#define ALL_INT_EXT (DATA_INT_EXT|PLL_INT_EXT|SLEEP_INT_EXT)
+#define NUM_INT_EXT (3)
+
+#define DATA_INT_CLR CLR_INT0
+#define PLL_INT_CLR CLR_INT1
+#define SLEEP_INT_CLR CLR_INT2
+
+#define ENABLE_RX_VMM (SEL_VMM_TBL1 | EN_VMM)
+#define ENABLE_TX_VMM (SEL_VMM_TBL0 | EN_VMM)
+
+#endif /* ENABLE_FAST_DMA */
+
+/*time for expiring the semaphores of cfg packets*/
+#define CFG_PKTS_TIMEOUT 2000
+/********************************************
+
+ Debug Type
+
+********************************************/
+typedef void (*nmi_debug_func)(uint32_t, char *, ...);
+
+/********************************************
+
+ Tx/Rx Queue Structure
+
+********************************************/
+
+struct txq_entry_t {
+ struct txq_entry_t *next;
+ int type;
+ uint8_t *buffer;
+ int buffer_size;
+ void *priv;
+ int status;
+ void (*tx_complete_func)(void *, int);
+};
+
+struct rxq_entry_t {
+ struct rxq_entry_t *next;
+ uint8_t *buffer;
+ int buffer_size;
+};
+
+/********************************************
+
+ Host IF Structure
+
+********************************************/
+
+typedef struct {
+ int (*hif_init)(nmi_wlan_inp_t *, nmi_debug_func);
+ int (*hif_deinit)(void *);
+ int (*hif_read_reg)(uint32_t, uint32_t *);
+ int (*hif_write_reg)(uint32_t, uint32_t);
+ int (*hif_block_rx)(uint32_t, uint8_t *, uint32_t);
+ int (*hif_block_tx)(uint32_t, uint8_t *, uint32_t);
+ int (*hif_sync)(void);
+ int (*hif_clear_int)(void);
+#if DMA_VER == DMA_VER_2
+ int (*hif_read_int)(uint32_t *);
+ int (*hif_clear_int_ext)(uint32_t);
+ int (*hif_read_size)(uint32_t *);
+ int (*hif_block_tx_ext)(uint32_t, uint8_t *, uint32_t);
+ int (*hif_block_rx_ext)(uint32_t, uint8_t *, uint32_t);
+ int (*hif_sync_ext)(int);
+#endif /* DMA_VER == DMA_VER_2 */
+ void (*hif_set_max_bus_speed)(void);
+ void (*hif_set_default_bus_speed)(void);
+} nmi_hif_func_t;
+
+/********************************************
+
+ Configuration Structure
+
+********************************************/
+
+#define MAX_CFG_FRAME_SIZE 1468
+
+typedef struct {
+ uint8_t ether_header[14];
+ uint8_t ip_header[20];
+ uint8_t udp_header[8];
+ uint8_t wid_header[4];
+ uint8_t frame[MAX_CFG_FRAME_SIZE];
+} nmi_cfg_frame_t;
+
+typedef struct {
+ int (*wlan_tx)(uint8_t *, uint32_t, nmi_tx_complete_func_t);
+} nmi_wlan_cfg_func_t;
+
+typedef struct {
+ int type;
+ uint32_t seq_no;
+} nmi_cfg_rsp_t;
+
+typedef struct {
+ int (*cfg_wid_set)(uint8_t *, uint32_t, uint16_t, uint8_t *, int);
+ int (*cfg_wid_get)(uint8_t *, uint32_t, uint16_t);
+ int (*cfg_wid_get_val)(uint16_t, uint8_t *, uint32_t);
+ int (*rx_indicate)(uint8_t *, int, nmi_cfg_rsp_t *);
+ int (*cfg_init)(nmi_debug_func);
+} nmi_cfg_func_t;
+
+#endif
diff --git a/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/nmi_wlan_cfg.h b/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/nmi_wlan_cfg.h
new file mode 100755
index 00000000..5f604cdf
--- /dev/null
+++ b/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/nmi_wlan_cfg.h
@@ -0,0 +1,33 @@
+////////////////////////////////////////////////////////////////////////////
+//
+// Copyright (c) Newport Media Inc. All rights reserved.
+//
+// Module Name: nmi_wlan_cfg.h
+//
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef NMI_WLAN_CFG_H
+#define NMI_WLAN_CFG_H
+
+typedef struct {
+ uint16_t id;
+ uint16_t val;
+} nmi_cfg_byte_t;
+
+typedef struct {
+ uint16_t id;
+ uint16_t val;
+} nmi_cfg_hword_t;
+
+typedef struct {
+ uint32_t id;
+ uint32_t val;
+} nmi_cfg_word_t;
+
+typedef struct {
+ uint32_t id;
+ uint8_t *str;
+} nmi_cfg_str_t;
+
+#endif
diff --git a/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/nmi_wlan_if.h b/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/nmi_wlan_if.h
new file mode 100755
index 00000000..23a2bf7d
--- /dev/null
+++ b/drivers/net/wireless/nmi/Nmc1000_Release6.2/src/driver/include/nmi_wlan_if.h
@@ -0,0 +1,925 @@
+////////////////////////////////////////////////////////////////////////////
+//
+// Copyright (c) Newport Media Inc. All rights reserved.
+//
+// Module Name: nmi_wlan_if.h
+//
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef NMI_WLAN_IF_H
+#define NMI_WLAN_IF_H
+
+/*bug 3887: [AP] Allow Management frames to be passed to the host*/
+#define NMI_AP_EXTERNAL_MLME
+//#define NMI_FULLY_HOSTING_AP
+//#define USE_OLD_SPI_SW
+
+//#define NMC1000_SINGLE_TRANSFER
+
+#include "nmi_type.h"
+#include "linux_wlan_common.h"
+
+
+/********************************************
+
+ Debug Flags
+
+********************************************/
+
+#define N_INIT 0x00000001
+#define N_ERR 0x00000002
+#define N_TXQ 0x00000004
+#define N_INTR 0x00000008
+#define N_RXQ 0x00000010
+
+/********************************************
+
+ Host Interface Defines
+
+********************************************/
+
+#define HIF_SDIO (0)
+#define HIF_SPI (1 << 0)
+#define HIF_SDIO_GPIO_IRQ (1 << 2)
+
+
+/********************************************
+
+ Tx/Rx Buffer Size Defines
+
+********************************************/
+
+#define CE_TX_BUFFER_SIZE (64 * 1024)
+#define CE_RX_BUFFER_SIZE (384 * 1024)
+
+/********************************************
+
+ Wlan Interface Defines
+
+********************************************/
+
+typedef struct {
+ uint32_t read_write:1;
+ uint32_t function:3;
+ uint32_t raw:1;
+ uint32_t address:17;
+ uint32_t data:8;
+} sdio_cmd52_t;
+
+typedef struct {
+ //struct {
+ uint32_t read_write:1;
+ uint32_t function:3;
+ uint32_t block_mode:1;
+ uint32_t increment:1;
+ uint32_t address:17;
+ uint32_t count:9;
+ //} bit;
+ uint8_t *buffer;
+ uint32_t block_size;
+} sdio_cmd53_t;
+
+typedef struct {
+ void (*os_sleep)(uint32_t);
+ void (*os_atomic_sleep)(uint32_t);
+ void (*os_debug)(uint8_t *);
+ void *(*os_malloc)(uint32_t);
+ void *(*os_malloc_atomic)(uint32_t);
+ void (*os_free)(void *);
+ void (*os_lock)(void *);
+ void (*os_unlock)(void *);
+ int (*os_wait)(void *,NMI_Uint32);
+ void (*os_signal)(void *);
+ void (*os_enter_cs)(void *);
+ void (*os_leave_cs)(void *);
+} nmi_wlan_os_func_t;
+
+typedef struct {
+ int io_type;
+ int (*io_init)(void *);
+ void (*io_deinit)(void *);
+ union {
+ struct {
+ int (*sdio_cmd52)(sdio_cmd52_t *);
+ int (*sdio_cmd53)(sdio_cmd53_t *);
+ int (*sdio_set_max_speed)(void);
+ int (*sdio_set_default_speed)(void);
+ } sdio;
+ struct {
+ int (*spi_max_speed)(void);
+ int (*spi_tx)(uint8_t *, uint32_t);
+ int (*spi_rx)(uint8_t *, uint32_t);
+ int (*spi_trx)(uint8_t *, uint8_t *, uint32_t);
+ } spi;
+ } u;
+} nmi_wlan_io_func_t;
+
+typedef struct {
+ void (*rx_indicate)(uint8_t *, uint32_t);
+ void (*rx_complete)(void);
+} nmi_wlan_net_func_t;
+
+typedef struct {
+ void (*mac_indicate)(int);
+} nmi_wlan_indicate_func_t;
+#define NMI_MAC_INDICATE_STATUS 0x1
+#define NMI_MAC_STATUS_INIT -1
+#define NMI_MAC_STATUS_READY 0
+#define NMI_MAC_STATUS_CONNECT 1
+
+#define NMI_MAC_INDICATE_SCAN 0x2
+
+typedef struct {
+ void *os_private;
+
+ void *hif_critical_section;
+
+ uint32_t tx_buffer_size;
+ void *txq_critical_section;
+ void *txq_wait_event;
+
+ //uint32_t rx_buffer_size;
+ void *rxq_critical_section;
+ void *rxq_wait_event;
+
+ void *cfg_wait_event;
+} nmi_wlan_os_context_t;
+
+typedef struct {
+ nmi_wlan_os_context_t os_context;
+ nmi_wlan_os_func_t os_func;
+ nmi_wlan_io_func_t io_func;
+ nmi_wlan_net_func_t net_func;
+ nmi_wlan_indicate_func_t indicate_func;
+} nmi_wlan_inp_t;
+
+#if 0
+typedef struct {
+ int start;
+ uint32_t id;
+ void *buffer;
+ uint32_t buffer_size;
+ int commit;
+} nmi_wlan_cfg_set_t;
+
+typedef struct {
+ int start;
+ uint32_t id;
+ int commit;
+} nmi_wlan_cfg_get_t;
+
+typedef struct {
+ uint32_t id;
+ void *buffer;
+ uint32_t buffer_size;
+} nmi_wlan_cfg_val_t;
+#endif
+
+typedef void (*nmi_tx_complete_func_t)(void *, int);
+
+#define NMI_TX_ERR_NO_BUF (-2)
+
+typedef struct {
+ int (*wlan_firmware_download)(const uint8_t *, uint32_t);
+ int (*wlan_start)(void);
+ int (*wlan_stop)(void);
+ int (*wlan_add_to_tx_que)(void *, uint8_t *, uint32_t, nmi_tx_complete_func_t);
+ int (*wlan_handle_tx_que)(uint32_t *);
+ void (*wlan_handle_rx_que)(void);
+ void (*wlan_handle_rx_isr)(void);
+ void (*wlan_cleanup)(void);
+ int (*wlan_cfg_set)(int, uint32_t, uint8_t *, uint32_t, int);
+ int (*wlan_cfg_get)(int, uint32_t, int);
+ int (*wlan_cfg_get_value)(uint32_t, uint8_t *, uint32_t);
+ /*Bug3959: transmitting mgmt frames received from host*/
+ #ifdef NMI_AP_EXTERNAL_MLME
+ int(*wlan_add_mgmt_to_tx_que)(void *, uint8_t *, uint32_t, nmi_tx_complete_func_t);
+ #endif
+} nmi_wlan_oup_t;
+
+/********************************************
+
+ Wlan Configuration ID
+
+********************************************/
+
+#define MAX_SSID_LEN 33
+#define MAX_RATES_SUPPORTED 12
+
+#define INFINITE_SLEEP_TIME (NMI_Uint32)0xFFFFFFFF
+
+#ifdef NMI_PARSE_SCAN_IN_HOST
+typedef enum{
+ SUPP_RATES_IE = 1,
+ EXT_SUPP_RATES_IE =50,
+ HT_CAPABILITY_IE =45,
+ RSN_IE = 48,
+ WPA_IE = 221,
+ WMM_IE=221,
+}BEACON_IE;
+#endif
+typedef enum{
+ INFRASTRUCTURE = 0,
+ INDEPENDENT,
+ AP,
+} BSSTYPE_T;
+
+typedef enum{
+ RATE_AUTO = 0,
+ RATE_1MB = 1,
+ RATE_2MB = 2,
+ RATE_5MB = 5,
+ RATE_6MB = 6,
+ RATE_9MB = 9,
+ RATE_11MB = 11,
+ RATE_12MB = 12,
+ RATE_18MB = 18,
+ RATE_24MB = 24,
+ RATE_26MB = 36,
+ RATE_48MB = 48,
+ RATE_54MB = 54
+} TX_RATE_T;
+
+typedef enum {
+ B_ONLY_MODE = 0, /* basic rate: 1, 2 Mbps, otherwise: 5, 11 Mbps */
+ G_ONLY_MODE, /* basic rate: 6, 12, 24 Mbps, otherwise: 9, 18, 36, 48, 54 Mbps */
+ G_MIXED_11B_1_MODE, /* basic rate: 1, 2, 5.5, 11 Mbps, otherwise: all on */
+ G_MIXED_11B_2_MODE, /* basic rate: 1, 2, 5, 11, 6, 12, 24 Mbps, otherwise: all on */
+} G_OPERATING_MODE_T;
+
+typedef enum {
+ G_SHORT_PREAMBLE = 0, /* Short Preamble */
+ G_LONG_PREAMBLE = 1, /* Long Preamble */
+ G_AUTO_PREAMBLE = 2, /* Auto Preamble Selection */
+} G_PREAMBLE_T;
+
+#define MAC_CONNECTED 1
+#define MAC_DISCONNECTED 0
+
+/*bug3819: */
+#define SCAN_DONE TRUE
+typedef enum{
+ PASSIVE_SCAN = 0,
+ ACTIVE_SCAN = 1,
+} SCANTYPE_T;
+
+typedef enum {
+ NO_POWERSAVE = 0,
+ MIN_FAST_PS = 1,
+ MAX_FAST_PS = 2,
+ MIN_PSPOLL_PS = 3,
+ MAX_PSPOLL_PS = 4
+} USER_PS_MODE_T;
+
+typedef enum {
+ CHIP_WAKEDUP = 0,
+ CHIP_SLEEPING_AUTO = 1,
+ CHIP_SLEEPING_MANUAL = 2
+} CHIP_PS_STATE_T;
+
+typedef enum {
+ NO_SECURITY = 0,
+ WEP_40 = 0x3,
+ WEP_104 = 0x7,
+ WPA_AES = 0x29,
+ WPA_TKIP = 0x49,
+ WPA_AES_TKIP = 0x69, /* Aes or Tkip */
+ WPA2_AES = 0x31,
+ WPA2_TKIP = 0x51,
+ WPA2_AES_TKIP = 0x71, /* Aes or Tkip */
+} SECURITY_T;
+
+typedef enum{
+ OPEN_SYSTEM = 1,
+ SHARED_KEY = 2,
+ ANY = 3,
+ IEEE8021 =5
+} AUTHTYPE_T;
+
+typedef enum {
+ SITE_SURVEY_1CH = 0,
+ SITE_SURVEY_ALL_CH = 1,
+ SITE_SURVEY_OFF = 2
+} SITE_SURVEY_T;
+
+typedef enum {
+ NORMAL_ACK = 0,
+ NO_ACK,
+} ACK_POLICY_T;
+
+typedef enum{
+ DONT_RESET = 0,
+ DO_RESET = 1,
+ NO_REQUEST = 2,
+} RESET_REQ_T;
+
+typedef enum {
+ REKEY_DISABLE = 1,
+ REKEY_TIME_BASE,
+ REKEY_PKT_BASE,
+ REKEY_TIME_PKT_BASE
+} RSNA_REKEY_POLICY_T;
+
+typedef enum {
+ FILTER_NO = 0x00,
+ FILTER_AP_ONLY = 0x01,
+ FILTER_STA_ONLY = 0x02
+} SCAN_CLASS_FITLER_T;
+
+typedef enum {
+ PRI_HIGH_RSSI = 0x00,
+ PRI_LOW_RSSI = 0x04,
+ PRI_DETECT = 0x08
+} SCAN_PRI_T;
+
+typedef enum {
+ CH_FILTER_OFF = 0x00,
+ CH_FILTER_ON = 0x10
+} CH_FILTER_T;
+
+typedef enum {
+ AUTO_PROT = 0, /* Auto */
+ NO_PROT, /* Do not use any protection */
+ ERP_PROT, /* Protect all ERP frame exchanges */
+ HT_PROT, /* Protect all HT frame exchanges */
+ GF_PROT, /* Protect all GF frame exchanges */
+} N_PROTECTION_MODE_T;
+
+typedef enum {
+ G_SELF_CTS_PROT,
+ G_RTS_CTS_PROT,
+} G_PROTECTION_MODE_T;
+
+typedef enum {
+ HT_MIXED_MODE = 1,
+ HT_ONLY_20MHZ_MODE,
+ HT_ONLY_20_40MHZ_MODE,
+} N_OPERATING_MODE_T;
+
+typedef enum {
+ NO_DETECT = 0,
+ DETECT_ONLY = 1,
+ DETECT_PROTECT = 2,
+ DETECT_PROTECT_REPORT = 3,
+} N_OBSS_DETECTION_T;
+
+typedef enum {
+ RTS_CTS_NONHT_PROT = 0, /* RTS-CTS at non-HT rate */
+ FIRST_FRAME_NONHT_PROT, /* First frame at non-HT rate */
+ LSIG_TXOP_PROT, /* LSIG TXOP Protection */
+ FIRST_FRAME_MIXED_PROT, /* First frame at Mixed format */
+} N_PROTECTION_TYPE_T;
+
+typedef enum {
+ STATIC_MODE = 1,
+ DYNAMIC_MODE = 2,
+ MIMO_MODE = 3, /* power save disable */
+} N_SMPS_MODE_T;
+
+typedef enum {
+ DISABLE_SELF_CTS,
+ ENABLE_SELF_CTS,
+ DISABLE_TX_ABORT,
+ ENABLE_TX_ABORT,
+ HW_TRIGGER_ABORT,
+ SW_TRIGGER_ABORT,
+} TX_ABORT_OPTION_T;
+
+typedef enum {
+ WID_CHAR = 0,
+ WID_SHORT = 1,
+ WID_INT = 2,
+ WID_STR = 3,
+ WID_BIN_DATA = 4,
+ WID_BIN = 5,
+ WID_IP = 6,
+ WID_ADR = 7,
+ WID_UNDEF = 8,
+ WID_TYPE_FORCE_32BIT = 0xFFFFFFFF
+
+} WID_TYPE_T,tenuWIDtype;
+
+typedef enum {
+ WID_NIL = 0xffff,
+
+
+ /* BSS Type */
+ /* -------------------------------------------------------------- */
+ /* Configuration : Infrastructure Independent Access Point */
+ /* Values to set : 0 1 2 */
+ /* -------------------------------------------------------------- */
+ WID_BSS_TYPE = 0x0000,
+
+ /* Transmit Rate */
+ /* -------------------------------------------------------------- */
+ /* Configuration : 1 2 5.5 11 6 9 12 18 24 36 48 54 */
+ /* Values to set : 1 2 5 11 6 9 12 18 24 36 48 54 */
+ /* -------------------------------------------------------------- */
+ WID_CURRENT_TX_RATE = 0x0001,
+
+ /* Channel */
+ /* ------------------------------------------------------------------- */
+ /* Configuration(g) : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 */
+ /* Values to set : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 */
+ /* -------------------------------------------------------------------- */
+ WID_CURRENT_CHANNEL = 0x0002,
+
+ /* Preamble */
+ /* -------------------------------------------------------------- */
+ /* Configuration : short long Auto */
+ /* Values to set : 0 1 2 */
+ /* -------------------------------------------------------------- */
+ WID_PREAMBLE = 0x0003,
+
+ /* 11g operating mode (ignored if 11g not present) */
+ /* -------------------------------------------------------------- */
+ /* Configuration : HighPerf Compat(RSet #1) Compat(RSet #2) */
+ /* Values to set : 1 2 3 */
+ /* -------------------------------------------------------------- */
+ WID_11G_OPERATING_MODE = 0x0004,
+
+ /* Mac status (response only) */
+ /* -------------------------------------------------------------- */
+ /* Configuration : disconnect connect */
+ /* Values to get : 0 1 */
+ /* -------------------------------------------------------------- */
+ WID_STATUS = 0x0005,
+
+ /* Scan type */
+ /* -------------------------------------------------------------- */
+ /* Configuration : Passive Scanning Active Scanning */
+ /* Values to set : 0 1 */
+ /* -------------------------------------------------------------- */
+ WID_SCAN_TYPE = 0x0007,
+
+ /* Key Id (WEP default key Id) */
+ /* -------------------------------------------------------------- */
+ /* Configuration : Any value between 0 to 3 */
+ /* Values to set : Same value. Default is 0 */
+ /* -------------------------------------------------------------- */
+ WID_KEY_ID = 0x0009,
+
+ /* QoS Enable */
+ /* -------------------------------------------------------------- */
+ /* Configuration : QoS Disable WMM Enable */
+ /* Values to set : 0 1 */
+ /* -------------------------------------------------------------- */
+ WID_QOS_ENABLE = 0x000A,
+
+ /* Power Management */
+ /* ------------------------------------------------------------------ */
+ /* Configuration : NO_POWERSAVE MIN_POWERSAVE MAX_POWERSAVE */
+ /* Values to set : 0 1 2 */
+ /* ------------------------------------------------------------------ */
+ WID_POWER_MANAGEMENT = 0x000B,
+
+ /* WEP/802 11I Configuration */
+ /* ------------------------------------------------------------------ */
+ /* Configuration : Disable WP40 WP104 WPA-AES WPA-TKIP RSN-AES RSN-TKIP */
+ /* Values (0x) : 00 03 07 29 49 31 51 */
+ /* */
+ /* Configuration : WPA-AES+TKIP RSN-AES+TKIP */
+ /* Values (0x) : 69 71 */
+ /* ------------------------------------------------------------------ */
+ WID_11I_MODE = 0x000C,
+
+ /* WEP Configuration: Used in BSS STA mode only when WEP is enabled */
+ /* ------------------------------------------------------------------ */
+ /* Configuration : Open System Shared Key Any Type | 802.1x Auth */
+ /* Values (0x) : 01 02 03 | BIT2 */
+ /* ------------------------------------------------------------------ */
+ WID_AUTH_TYPE = 0x000D,
+
+ /* Site Survey Type */
+ /* -------------------------------------------------------------- */
+ /* Configuration : Values to set */
+ /* Survey 1 Channel : 0 */
+ /* survey all Channels : 1 */
+ /* Disable Site Survey : 2 */
+ /* -------------------------------------------------------------- */
+ WID_SITE_SURVEY = 0x000E,
+
+ /* Listen Interval */
+ /* -------------------------------------------------------------- */
+ /* Configuration : Any value between 1 to 255 */
+ /* Values to set : Same value. Default is 3 */
+ /* -------------------------------------------------------------- */
+ WID_LISTEN_INTERVAL = 0x000F,
+
+ /* DTIM Period */
+ /* -------------------------------------------------------------- */
+ /* Configuration : Any value between 1 to 255 */
+ /* Values to set : Same value. Default is 3 */
+ /* -------------------------------------------------------------- */
+ WID_DTIM_PERIOD = 0x0010,
+
+ /* ACK Policy */
+ /* -------------------------------------------------------------- */
+ /* Configuration : Normal Ack No Ack */
+ /* Values to set : 0 1 */
+ /* -------------------------------------------------------------- */
+ WID_ACK_POLICY = 0x0011,
+
+ /* Reset MAC (Set only) */
+ /* -------------------------------------------------------------- */
+ /* Configuration : Don't Reset Reset No Request */
+ /* Values to set : 0 1 2 */
+ /* -------------------------------------------------------------- */
+ WID_RESET = 0x0012,
+
+ /* Broadcast SSID Option: Setting this will adhere to "" SSID element */
+ /* ------------------------------------------------------------------ */
+ /* Configuration : Enable Disable */
+ /* Values to set : 1 0 */
+ /* ------------------------------------------------------------------ */
+ WID_BCAST_SSID = 0x0015,
+
+ /* Disconnect (Station) */
+ /* ------------------------------------------------------------------ */
+ /* Configuration : Association ID */
+ /* Values to set : Association ID */
+ /* ------------------------------------------------------------------ */
+ WID_DISCONNECT = 0x0016,
+
+ /* 11a Tx Power Level */
+ /* -------------------------------------------------------------------- */
+ /* Configuration : Sets TX Power (Higher the value greater the power) */
+ /* Values to set : Any value between 0 and 63 (inclusive; Default is 48)*/
+ /* -------------------------------------------------------------------- */
+ WID_TX_POWER_LEVEL_11A = 0x0018,
+
+ /* Group Key Update Policy Selection */
+ /* -------------------------------------------------------------------- */
+ /* Configuration : Disabled timeBased packetBased timePacketBased */
+ /* Values to set : 1 2 3 4 */
+ /* -------------------------------------------------------------------- */
+ WID_REKEY_POLICY = 0x0019,
+
+ /* Allow Short Slot */
+ /* -------------------------------------------------------------- */
+ /* Configuration : Disallow Short Slot Allow Short Slot */
+ /* (Enable Only Long Slot) (Enable Short Slot if applicable)*/
+ /* Values to set : 0 1 */
+ /* -------------------------------------------------------------- */
+ WID_SHORT_SLOT_ALLOWED = 0x001A,
+
+ WID_PHY_ACTIVE_REG = 0x001B,
+
+ /* 11b Tx Power Level */
+ /* -------------------------------------------------------------------- */
+ /* Configuration : Sets TX Power (Higher the value greater the power) */
+ /* Values to set : Any value between 0 and 63 (inclusive; Default is 48)*/
+ /* -------------------------------------------------------------------- */
+ WID_TX_POWER_LEVEL_11B = 0x001D,
+
+ /* Scan Request */
+ /* -------------------------------------------------------------------- */
+ /* Configuration : Request default scan */
+ /* Values to set : 0 */
+ /* -------------------------------------------------------------------- */
+ WID_START_SCAN_REQ = 0x001E,
+
+ /* Rssi (get only) */
+ /* -------------------------------------------------------------------- */
+ /* Configuration : */
+ /* Values to get : Rssi value */
+ /* -------------------------------------------------------------------- */
+ WID_RSSI = 0x001F,
+
+ /* Join Request */
+ /* -------------------------------------------------------------------- */
+ /* Configuration : Request to join */
+ /* Values to set : index of scan result */
+ /* -------------------------------------------------------------------- */
+ WID_JOIN_REQ = 0x0020,
+
+ /* Enable User Control of TX Power */
+ /* -------------------------------------------------------------------- */
+ /* Configuration : Disable Enable */
+ /* Values to set : 0 1 */
+ /* -------------------------------------------------------------------- */
+ WID_USER_CONTROL_ON_TX_POWER = 0x0027,
+
+ WID_MEMORY_ACCESS_8BIT = 0x0029,
+
+ /* Enable Auto RX Sensitivity feature */
+ /* -------------------------------------------------------------------- */
+ /* Configuration : Disable Enable */
+ /* Values to set : 0 1 */
+ /* -------------------------------------------------------------------- */
+ WID_AUTO_RX_SENSITIVITY = 0x0032,
+
+ /* Receive Buffer Based Ack */
+ /* -------------------------------------------------------------------- */
+ /* Configuration : Disable Enable */
+ /* Values to set : 0 1 */
+ /* -------------------------------------------------------------------- */
+ WID_DATAFLOW_CONTROL = 0x0033,
+
+ /* Scan Filter */
+ /* -------------------------------------------------------------------- */
+ /* Configuration : Class No filter AP only Station Only */
+ /* Values to set : 0 1 2 */
+ /* Configuration : Priority High Rssi Low Rssi Detect */
+ /* Values to set : 0 0x4 0x08 */
+ /* Configuration : Channel filter off filter on */
+ /* Values to set : 0 0x10 */
+ /* -------------------------------------------------------------------- */
+ WID_SCAN_FILTER = 0x0036,
+
+ /* Link Loss Threshold (measure in the beacon period) */
+ /* -------------------------------------------------------------------- */
+ /* Configuration : Any value between 10 and 254 (Set to 255 to disable it) */
+ /* Values to set : Same value. Default is 10 */
+ /* -------------------------------------------------------------------- */
+ WID_LINK_LOSS_THRESHOLD = 0x0037,
+
+ /* NMAC Character WID list */
+ WID_WPS_START = 0x0043,
+
+ /* Protection mode for MAC */
+ /* -------------------------------------------------------------- */
+ /* Configuration : Auto No protection ERP HT GF */
+ /* Values to set : 0 1 2 3 4 */
+ /* -------------------------------------------------------------- */
+ WID_11N_PROT_MECH = 0x0080,
+
+ /* ERP Protection type for MAC */
+ /* -------------------------------------------------------------- */
+ /* Configuration : Self-CTS RTS-CTS */
+ /* Values to set : 0 1 */
+ /* -------------------------------------------------------------- */
+ WID_11N_ERP_PROT_TYPE = 0x0081,
+
+ /* HT Option Enable */
+ /* -------------------------------------------------------------- */
+ /* Configuration : HT Enable HT Disable */
+ /* Values to set : 1 0 */
+ /* -------------------------------------------------------------- */
+ WID_11N_ENABLE = 0x0082,
+
+ /* 11n Operating mode (Note that 11g operating mode will also be */
+ /* used in addition to this, if this is set to HT Mixed mode) */
+ /* -------------------------------------------------------------- */
+ /* Configuration : HT Mixed HT Only-20MHz HT Only-20/40MHz */
+ /* Values to set : 1 2 3 */
+ /* -------------------------------------------------------------- */
+ WID_11N_OPERATING_MODE = 0x0083,
+
+ /* 11n OBSS non-HT STA Detection flag */
+ /* -------------------------------------------------------------- */
+ /* Configuration : Do not detect */
+ /* Values to set : 0 */
+ /* Configuration : Detect, do not protect or report */
+ /* Values to set : 1 */
+ /* Configuration : Detect, protect and do not report */
+ /* Values to set : 2 */
+ /* Configuration : Detect, protect and report to other BSS */
+ /* Values to set : 3 */
+ /* -------------------------------------------------------------- */
+ WID_11N_OBSS_NONHT_DETECTION = 0x0084,
+
+ /* 11n HT Protection Type */
+ /* -------------------------------------------------------------- */
+ /* Configuration : RTS-CTS First Frame Exchange at non-HT-rate */
+ /* Values to set : 0 1 */
+ /* Configuration : LSIG TXOP First Frame Exchange in Mixed Fmt */
+ /* Values to set : 2 3 */
+ /* -------------------------------------------------------------- */
+ WID_11N_HT_PROT_TYPE = 0x0085,
+
+ /* 11n RIFS Protection Enable Flag */
+ /* -------------------------------------------------------------- */
+ /* Configuration : Disable Enable */
+ /* Values to set : 0 1 */
+ /* -------------------------------------------------------------- */
+ WID_11N_RIFS_PROT_ENABLE = 0x0086,
+
+ /* SMPS Mode */
+ /* -------------------------------------------------------------- */
+ /* Configuration : Static Dynamic MIMO (Power Save Disabled) */
+ /* Values to set : 1 2 3 */
+ /* -------------------------------------------------------------- */
+ WID_11N_SMPS_MODE = 0x0087,
+
+ /* Current transmit MCS */
+ /* -------------------------------------------------------------- */
+ /* Configuration : MCS Index for data rate */
+ /* Values to set : 0 to 7 */
+ /* -------------------------------------------------------------- */
+ WID_11N_CURRENT_TX_MCS = 0x0088,
+
+ WID_11N_PRINT_STATS = 0x0089,
+
+ /* 11n Short GI Enable Flag */
+ /* -------------------------------------------------------------- */
+ /* Configuration : Disable Enable */
+ /* Values to set : 0 1 */
+ /* -------------------------------------------------------------- */
+ WID_11N_SHORT_GI_ENABLE = 0x008D,
+
+ /* 11n RIFS Enable Flag */
+ /* -------------------------------------------------------------- */
+ /* Configuration : Disable Enable */
+ /* Values to set : 0 1 */
+ /* -------------------------------------------------------------- */
+ WID_RIFS_MODE = 0x0094,
+
+ /* TX Abort Feature */
+ /* -------------------------------------------------------------- */
+ /* Configuration : Disable Self CTS Enable Self CTS */
+ /* Values to set : 0 1 */
+ /* Configuration : Disable TX Abort Enable TX Abort */
+ /* Values to set : 2 3 */
+ /* Configuration : Enable HW TX Abort Enable SW TX Abort */
+ /* Values to set : 4 5 */
+ /* -------------------------------------------------------------- */
+ WID_TX_ABORT_CONFIG = 0x00A1,
+
+ WID_REG_TSSI_11B_VALUE = 0x00A6,
+ WID_REG_TSSI_11G_VALUE = 0x00A7,
+ WID_REG_TSSI_11N_VALUE = 0x00A8,
+ WID_TX_CALIBRATION = 0x00A9,
+ WID_DSCR_TSSI_11B_VALUE = 0x00AA,
+ WID_DSCR_TSSI_11G_VALUE = 0x00AB,
+ WID_DSCR_TSSI_11N_VALUE = 0x00AC,
+
+ /* Immediate Block-Ack Support */
+ /* -------------------------------------------------------------- */
+ /* Configuration : Disable Enable */
+ /* Values to set : 0 1 */
+ /* -------------------------------------------------------------- */
+ WID_11N_IMMEDIATE_BA_ENABLED = 0x00AF,
+
+ /* TXOP Disable Flag */
+ /* -------------------------------------------------------------- */
+ /* Configuration : Disable Enable */
+ /* Values to set : 1 0 */
+ /* -------------------------------------------------------------- */
+ WID_11N_TXOP_PROT_DISABLE = 0x00B0,
+
+
+ WID_TX_POWER_LEVEL_11N = 0x00B1,
+
+ /* Custom Character WID list */
+ WID_PC_TEST_MODE = 0x00C8,
+ /*bug3819: */
+ /* SCAN Complete notification WID*/
+ WID_SCAN_COMPLETE =0x00C9,
+
+#ifdef NMI_AP_EXTERNAL_MLME
+ WID_DEL_BEACON = 0x00CA,
+#endif
+
+ /* EMAC Short WID list */
+ /* RTS Threshold */
+ /* -------------------------------------------------------------- */
+ /* Configuration : Any value between 256 to 2347 */
+ /* Values to set : Same value. Default is 2347 */
+ /* -------------------------------------------------------------- */
+ WID_RTS_THRESHOLD = 0x1000,
+
+ /* Fragmentation Threshold */
+ /* -------------------------------------------------------------- */
+ /* Configuration : Any value between 256 to 2346 */
+ /* Values to set : Same value. Default is 2346 */
+ /* -------------------------------------------------------------- */
+ WID_FRAG_THRESHOLD = 0x1001,
+
+ WID_SHORT_RETRY_LIMIT = 0x1002,
+ WID_LONG_RETRY_LIMIT = 0x1003,
+ WID_BEACON_INTERVAL = 0x1006,
+ WID_MEMORY_ACCESS_16BIT = 0x1008,
+ WID_RX_SENSE = 0x100B,
+ WID_ACTIVE_SCAN_TIME = 0x100C,
+ WID_PASSIVE_SCAN_TIME = 0x100D,
+
+ WID_SITE_SURVEY_SCAN_TIME = 0x100E,
+ WID_JOIN_START_TIMEOUT = 0x100F,
+ WID_AUTH_TIMEOUT = 0x1010,
+ WID_ASOC_TIMEOUT = 0x1011,
+ WID_11I_PROTOCOL_TIMEOUT = 0x1012,
+ WID_EAPOL_RESPONSE_TIMEOUT = 0x1013,
+
+ /* NMAC Short WID list */
+ WID_11N_SIG_QUAL_VAL = 0x1085,
+ WID_CCA_THRESHOLD = 0x1087,
+
+ /* Custom Short WID list */
+
+ /* EMAC Integer WID list */
+ WID_FAILED_COUNT = 0x2000,
+ WID_RETRY_COUNT = 0x2001,
+ WID_MULTIPLE_RETRY_COUNT = 0x2002,
+ WID_FRAME_DUPLICATE_COUNT = 0x2003,
+ WID_ACK_FAILURE_COUNT = 0x2004,
+ WID_RECEIVED_FRAGMENT_COUNT = 0x2005,
+ WID_MCAST_RECEIVED_FRAME_COUNT = 0x2006,
+ WID_FCS_ERROR_COUNT = 0x2007,
+ WID_SUCCESS_FRAME_COUNT = 0x2008,
+ WID_HUT_TX_COUNT = 0x200A,
+ WID_TX_FRAGMENT_COUNT = 0x200B,
+ WID_TX_MULTICAST_FRAME_COUNT = 0x200C,
+ WID_RTS_SUCCESS_COUNT = 0x200D,
+ WID_RTS_FAILURE_COUNT = 0x200E,
+ WID_WEP_UNDECRYPTABLE_COUNT = 0x200F,
+ WID_REKEY_PERIOD = 0x2010,
+ WID_REKEY_PACKET_COUNT = 0x2011,
+ WID_1X_SERV_ADDR = 0x2012,
+ WID_STACK_IP_ADDR = 0x2013,
+ WID_STACK_NETMASK_ADDR = 0x2014,
+ WID_HW_RX_COUNT = 0x2015,
+ WID_MEMORY_ADDRESS = 0x201E,
+ WID_MEMORY_ACCESS_32BIT = 0x201F,
+ WID_RF_REG_VAL = 0x2021,
+
+ /* NMAC Integer WID list */
+ WID_11N_PHY_ACTIVE_REG_VAL = 0x2080,
+
+ /* Custom Integer WID list */
+ WID_GET_INACTIVE_TIME = 0x2084,
+ /* EMAC String WID list */
+ WID_SSID = 0x3000,
+ WID_FIRMWARE_VERSION = 0x3001,
+ WID_OPERATIONAL_RATE_SET = 0x3002,
+ WID_BSSID = 0x3003,
+ WID_WEP_KEY_VALUE = 0x3004,
+ WID_11I_PSK = 0x3008,
+ WID_11E_P_ACTION_REQ = 0x3009,
+ WID_1X_KEY = 0x300A,
+ WID_HARDWARE_VERSION = 0x300B,
+ WID_MAC_ADDR = 0x300C,
+ WID_HUT_DEST_ADDR = 0x300D,
+ WID_PHY_VERSION = 0x300F,
+ WID_SUPP_USERNAME = 0x3010,
+ WID_SUPP_PASSWORD = 0x3011,
+ WID_SITE_SURVEY_RESULTS = 0x3012,
+ WID_RX_POWER_LEVEL = 0x3013,
+ WID_SET_STA_MAC_INACTIVE_TIME = 0x3017,
+ WID_ADD_WEP_KEY = 0x3019,
+ WID_REMOVE_WEP_KEY = 0x301A,
+ WID_ADD_PTK = 0x301B,
+ WID_ADD_RX_GTK = 0x301C,
+ WID_ADD_TX_GTK = 0x301D,
+ WID_REMOVE_KEY = 0x301E,
+ WID_ASSOC_REQ_INFO = 0x301F,
+ WID_ASSOC_RES_INFO = 0x3020,
+ WID_MANUFACTURER = 0x3026, /*Added for CAPI tool */
+ WID_MODEL_NAME = 0x3027, /*Added for CAPI tool */
+ WID_MODEL_NUM = 0x3028, /*Added for CAPI tool */
+ WID_DEVICE_NAME = 0x3029, /*Added for CAPI tool */
+
+ /* NMAC String WID list */
+ WID_11N_P_ACTION_REQ = 0x3080,
+ WID_HUT_TEST_ID = 0x3081,
+ WID_PMKID_INFO = 0x3082,
+ WID_FIRMWARE_INFO = 0x3083,
+ /*BugID_4156*/
+ WID_SSID_PROBE_REQ = 0x3997,
+ /*BugID_4124 WID to trigger modified Join Request using SSID and BSSID instead of bssListIdx (used by WID_JOIN_REQ)*/
+ WID_JOIN_REQ_EXTENDED = 0x3998,
+
+
+
+
+ /* Custom String WID list */
+
+ /* EMAC Binary WID list */
+ WID_UAPSD_CONFIG = 0x4001,
+ WID_UAPSD_STATUS = 0x4002,
+ WID_WMM_AP_AC_PARAMS = 0x4003,
+ WID_WMM_STA_AC_PARAMS = 0x4004,
+ WID_NETWORK_INFO = 0x4005,
+ WID_STA_JOIN_INFO = 0x4006,
+ WID_CONNECTED_STA_LIST = 0x4007,
+
+ /* NMAC Binary WID list */
+ WID_11N_AUTORATE_TABLE = 0x4080,
+
+
+ /*Added here by Amr - BugID 4134*/
+ WID_SCAN_CHANNEL_LIST = 0x4084,
+
+ /*BugID_3746 WID to add IE to be added in next probe request*/
+ WID_INFO_ELEMENT_PROBE = 0x4085,
+ /*BugID_3746 WID to add IE to be added in next associate request*/
+ WID_INFO_ELEMENT_ASSOCIATE = 0x4086,
+ WID_ADD_STA = 0X4087,
+ WID_REMOVE_STA = 0X4088,
+ WID_EDIT_STA = 0X4089,
+ WID_ADD_BEACON = 0x408a,
+
+ /* Miscellaneous WIDs */
+ WID_ALL = 0x7FFE,
+ WID_MAX = 0xFFFF
+} WID_T;
+
+int nmi_wlan_init(nmi_wlan_inp_t *inp, nmi_wlan_oup_t *oup);
+
+void nmi_bus_set_max_speed(void);
+void nmi_bus_set_default_speed(void);
+uint32_t nmi_get_chipid(uint8_t update);
+
+
+#endif